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