I've been looking like mad for an answer to this however I'm still in the dark:
i am using
int[] getTermPositions(int index)
of a TermPositionVector I have for a field (which has been set to store both offsets and positions) to get the term positions of the terms I'm interested in highlighting as keyword in context.
The question: What do these positions correspond to? Obviously not the
String[] getTerms()
that is returned by the TermFreqVector interface, as that contains just raw counts of my terms.
What I'm looking for is a way to get the "tokenized" array of my field so I can then pull out the surrounding terms around the index values returned by getTermPositions(int index)
Help? Thanks a bunch.