gaobinlong opened a new pull request, #15819:
URL: https://github.com/apache/lucene/pull/15819

   ### Description
   
   Resolves https://github.com/apache/lucene/issues/13796.
   
   Fix SpanOrQuery scores each document not using only the IDF of the term that 
matched, but the combined IDF of all clauses. With two docs (foo:bar, foo:baz) 
and a spanOr([foo:bar, foo:baz]) query, each doc should score the same as the 
equivalent bool-should query (i.e.single-term IDF, not summed IDF). Compare the 
result in OpenSearch as follows:
   
   With bool-should query, idf for doc (foo:bar) is 0.6931472
   <img width="1682" height="522" alt="image" 
src="https://github.com/user-attachments/assets/2fb0c860-faf9-493c-a6df-e15778422bd3";
 />
   
   With SpanOr query, idf for doc (foo:bar) is 1.3862944 which is 0.6931472 + 
0.6931472
   <img width="1671" height="674" alt="image" 
src="https://github.com/user-attachments/assets/d4b82dad-bad5-4999-91cc-fdc4f78e51f1";
 />
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to