lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Are term vector position returned ordered in Lucene 3.6?
Date Mon, 03 Feb 2014 12:05:47 GMT
Yes, positions for a given term are monotonically increasing.

Note that this is an old API; it's been replaced with the "normal"
postings API in 4.x.

Mike McCandless

http://blog.mikemccandless.com


On Mon, Feb 3, 2014 at 6:53 AM, andi rexha <a_rexha@hotmail.com> wrote:
> Hi,
> 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!
>
>
>

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


Mime
View raw message