uschindler commented on issue #12342:
URL: https://github.com/apache/lucene/issues/12342#issuecomment-1592920756

   > Yeah. Another thing we could consider is doing this scaling in 
KnnVectorQuery and/or its Scorer. These have the ultimate responsibility of 
complying with the Scorer contract. If we did it there we wouldn't have to 
change the output of VectorSimilarity. However it's messy to do it there since 
this is specific to a particular similarity implementation, so on balance doing 
it in the similarity makes more sense to me.
   
   Wasn't there the possibility to return a score for indexing and for search? 
Basically the VectorSimilarity enum could have a separate method called 
queryScore(v1, v2) that is enforced to be positive. Actually for cosine its not 
a problem as its normalized, so we can add 1 (and for safety to prevent 
rounding errors add `Math.max(0, result)`). The absolute values of scores are 
not important (unless you want to bring them together with other query scores, 
but for that you have boost of queries).


-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to