lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <trej...@trypticon.org>
Subject Re: Are "position" and "position increment" actually the exact same concept?
Date Sun, 14 Feb 2016 10:51:33 GMT
On Tue, Feb 9, 2016 at 2:39 AM, András Péteri
<apeteri@b2international.com> wrote:
> It's only the naming of FieldQueryNode's property that seems ambiguous to
> me. The caller of setPositionIncrement(int), AnalyzerQueryNodeProcessor
> [1], computes absolute term positions and stores that value in the
> property, not the increments. If the term attribute is not available, it'll
> increment the position by 1 for each term/groups of terms.
>
> [1]
> https://github.com/apache/lucene-solr/blob/master/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/AnalyzerQueryNodeProcessor.java

Ah, that would explain my issue then. I had a custom builder which was
taking it as the position increment and computing the position and had
wondered why I was getting "sliding" positions only for our own custom
query nodes while somehow the normal phrase queries were working. :)

TX

---------------------------------------------------------------------
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