You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/05/30 13:31:33 UTC

[GitHub] [lucene] alessandrobenedetti commented on pull request #926: VectorSimilarityFunction reverse removal

alessandrobenedetti commented on PR #926:
URL: https://github.com/apache/lucene/pull/926#issuecomment-1141164970

   @mayya-sharipova , @msokolov  I found out the reason the original tests are now failing.
   The tie-breaking by Lucene docId (smaller id wins) doesn't actually work right now(for the regular similarities) and not for Euclidean after my changes.
   
   The reason is the way we encode the heap value from the nodeId and the score:
   
   private long encode(int node, float score) {
       return order.apply((((long) NumericUtils.floatToSortableInt(score)) << 32) | node);
     } 
     
     With this encoding, a higher node Id wins.
     
     Tests for cosine and dot-product are slighly different from the Euclidean and doesn't check tie-breaking.
     I am taking a look right now to fix it.


-- 
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-unsubscribe@lucene.apache.org

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


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