mayya-sharipova commented on code in PR #14215: URL: https://github.com/apache/lucene/pull/14215#discussion_r1949902014
########## 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: May be instead of adding `Math.nextUp` in different collectors, some of which we may miss, it is better to update local `minAcceptedSimilarity` in `HnswGraphSearcher:searchLevel` ? ```java minAcceptedSimilarity =Math.nextUp( results.minCompetitiveSimilarity()); ``` -- 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