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.
HTH
-Grant
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------
Grant Ingersoll
Center for Natural Language Processing
http://www.cnlp.org/tech/lucene.asp
Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/
LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]