You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/02/03 22:49:19 UTC

[GitHub] [lucene] mayya-sharipova commented on a change in pull request #641: LUCENE-10391: Reuse data structures across HnswGraph#searchLevel calls

mayya-sharipova commented on a change in pull request #641:
URL: https://github.com/apache/lucene/pull/641#discussion_r799027275



##########
File path: lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphBuilder.java
##########
@@ -93,6 +96,11 @@ public HnswGraphBuilder(
     this.random = new SplittableRandom(seed);
     int levelOfFirstNode = getRandomGraphLevel(ml, random);
     this.hnsw = new HnswGraph(maxConn, levelOfFirstNode);
+    this.graphSearcher =
+        new HnswGraphSearcher(
+            similarityFunction,
+            new NeighborQueue(beamWidth, similarityFunction.reversed == false),
+            new FixedBitSet(vectorValues.size()));

Review comment:
       @jtibshirani I am wondering what is the reasoning of using `FixedBitSet` during graph construction?   Are we expecting to visit most of the graph nodes ( I guess that's true on a smaller graphs)?




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