msokolov commented on code in PR #13463:
URL: https://github.com/apache/lucene/pull/13463#discussion_r1631252496


##########
lucene/core/src/java/org/apache/lucene/search/knn/MultiLeafKnnCollector.java:
##########
@@ -103,8 +105,11 @@ public boolean collect(int docId, float similarity) {
     if (kResultsCollected) {
       // as we've collected k results, we can start do periodic updates with 
the global queue
       if (firstKResultsCollected || (subCollector.visitedCount() & interval) 
== 0) {
-        cachedGlobalMinSim = 
globalSimilarityQueue.offer(updatesQueue.getHeap());
-        updatesQueue.clear();
+        for (int i = 0; i < k(); i++) {

Review Comment:
   could you add a comment explaining what this is up to? I think the idea is 
to "offer" a sorted array instead of a heap?



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