lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Does Index have a Tokenizer Built into it
Date Wed, 18 Jul 2007 05:07:18 GMT

: After indexing I have been able to retrieve the TermPositionVector from the
: index and it has all of the data, but I cannot find a way where given a
: position I can retrieve the term at that position. Which is how I was hoping
: to create my contextual snippets.

there is no easy way to go from a position to a term -- coincidently there
is a very recent thread on this on java-dev...

...a new API may come out of it, but in the mean time you may be
interested in taking the approach the current highlighter uses (as
mentioned in that thread), of using the TermPositionVector to rebuild the
orriginal tokenstream, then skipping ahead to the positions you are
interested in.


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

View raw message