I want to get the offset of one term in the Lucene . How can i get it ?
I vectored my content as
Field.TermVector.WITH_POSITIONS_OFFSETS
Is there any method in Lucene that give me offset of the term in one Document ?
I want to get the offset of one term in the Lucene . How can i get it ?
I vectored my content as
Field.TermVector.WITH_POSITIONS_OFFSETS
Is there any method in Lucene that give me offset of the term in one Document ?
Try this:
TermPositionVector vector = (TermPositionVector) reader.getTermFreqVector(docId, myfield);
See http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/index/TermPositionVector.html on how to use TermPositionVector to get the info you want.