You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Mauro Verrocchio <ma...@gmail.com> on 2005/02/24 17:03:08 UTC

Navigate though terms in a document

Hi all,
I'm using lucene to store and index documents in a corpus for an
university project and i need to implement the search for concordates
of a given term, this means to find x terms before and after the given
term in each document (for a variable x). I found the method
TermPositions(Term t) for the IndexReader class which gives a
TermPositions used to navigate inside a document, but i didn't
understand what exactly nextPosition() gives out and how to use that
result to find the closer terms (ie using the position for giving back
the term at position position+1, -1, +2, -2, etc.).
Is there some sort of "term navigator"?

Thanks,
Mauro.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org