lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <>
Date Thu, 24 May 2007 11:05:48 GMT
WITH_OFFSETS gives the equivalent of Token.startOffset and  
Token.endOffset information which is the actual offset in the String  
(although it can be manipulated), while WITH_POSITIONS gives the  
position information (which can also be manipulated).  Position info  
tells where the token occurs relative to the other tokens, i.e. what  
order they occur in.

Using WITH_POSITIONS is in line with getTermPositions().

The practical use of using WITH_P_O is when you need both positions  
and offsets, I guess.  Maybe in highlighting or some advanced  
analysis cases.


On May 24, 2007, at 12:03 AM, Michael Mitiaguin wrote:

> What practical of using  WITH_POSITIONS_OFFSETS ? Aren't  WITH_OFFSETS
> sufficient and if iterate getStartOffset effectively gives the value
> from array element of  getTermPositions ?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Grant Ingersoll
Center for Natural Language Processing

Read the Lucene Java FAQ at 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message