You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "tang-hi (via GitHub)" <gi...@apache.org> on 2023/05/18 16:57:57 UTC

[GitHub] [lucene] tang-hi commented on a diff in pull request #12303: Address HNSW Searcher performance regression

tang-hi commented on code in PR #12303:
URL: https://github.com/apache/lucene/pull/12303#discussion_r1198060903


##########
lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphSearcher.java:
##########
@@ -179,7 +182,7 @@ public static NeighborQueue search(
       }
       eps[0] = results.pop();
     }
-    results.clear();
+    results = new NeighborQueue(topK, false);
     graphSearcher.searchLevel(

Review Comment:
   ```suggestion
       results = graphSearcher.searchLevel(query, topK, 0, eps, vectors, graph, acceptOrds, visitedLimit);
   ```



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org