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: [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]