: I am confused with the ordering rule about SpanNearQuery. For example, I 
: indicate the slot in SpanNearQuery is 10. And the results are all the 
: qualified documents. Is it true that any document with shorter distance 
        ...
: it till uses tf-idf algorithm to rank the docs. Or there is some complex 
: algorithm blending the distance and tf-idf algorithm.

Its blended ... think of each occurance of a specified span as a 
"psuedo-term" but instead of each occurance incrementing the 
"psuedo-term-frequency" by "1" it increments it by a floating point number 
based on how sloppy the match was (an exact match is usually "1", a sloppy 
match is usually something smaller)...

https://lucene.apache.org/core/4_0_0/core/org/apache/lucene/search/similarities/TFIDFSimilarity.html#sloppyFreq%28int%29

As Jack mentioned: look at the explain results for the details for any 
specific query & doc

-Hoss

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

Reply via email to