: 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...
http://www.nabble.com/Best-Practices-for-getting-Strings-from-a-position-range-tf4084187.html

...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.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to