lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andi rexha <>
Subject Are term vector position returned ordered in Lucene 3.6?
Date Mon, 03 Feb 2014 11:53:56 GMT
I am extracting term vectors position in Lucene 3.6. First I extract the term vector and get
the indexes from the "indexOf" method as suggested for extracting the position.

TermPositionVector termFreqVector = (TermPositionVector) reader.getTermFreqVector(i, termField);
String[] terms = termFreqVector.getTerms();
int[] indexesOf = termFreqVector.indexesOf(terms, 0, terms.length);

Is the indexOf the same as the terms index?

My main question anyway is weather I can assume that the position returned from the position
is ordered :

                    int[] termPositions = termFreqVector.getTermPositions(indexesOf[j]);

so can I assume that  termPositions[i] > termPositions[j] for i > j   ??

Thank you!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message