jimczi commented on code in PR #14215:
URL: https://github.com/apache/lucene/pull/14215#discussion_r1950877363
##########
lucene/core/src/java/org/apache/lucene/search/TopKnnCollector.java:
##########
@@ -52,7 +52,7 @@ public boolean collect(int docId, float similarity) {
@Override
public float minCompetitiveSimilarity() {
- return queue.size() >= k() ? queue.topScore() : Float.NEGATIVE_INFINITY;
+ return queue.size() >= k() ? Math.nextUp(queue.topScore()) :
Float.NEGATIVE_INFINITY;
Review Comment:
It was more about the high-level contract of minCompetitiveSimilarity. It's
not a big deal, but it does place the responsibility on the various
implementers.
--
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]