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

   ### Description
   `SUM_MAX_SIM` summed `VectorSimilarityFunction.compare` per query token, 
which returns a scaled score. The scaling is affine for `COSINE` and 
`DOT_PRODUCT` but not for `EUCLIDEAN (1 / (1 + d^2))` or 
`MAXIMUM_INNER_PRODUCT`, so documents could be ranked out of `MaxSim` order. 
Here is a counter-example: query (1,0,0), (0,1,0); doc A (1,0,0); doc B (0.55, 
0.55, 0.6285). Under EUCLIDEAN, A scores 1.333 and B scores 1.053, placing A 
ahead; however, MaxSim would rank B first (with Σd² values ​​of 2.0 and 1.8, 
respectively).
   
   The fix is ​​to use n * f(S/n); scores for COSINE and DOT_PRODUCT remain 
unchanged.
   


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