search on proper level when connecting graph components (#13846)

This commit is contained in:
Michael Sokolov 2024-10-02 12:47:49 -04:00 committed by Michael Sokolov
parent 8c9204d1cc
commit fae57d03ca
1 changed files with 1 additions and 1 deletions

View File

@ -470,7 +470,7 @@ public class HnswGraphBuilder implements HnswBuilder {
RandomVectorScorer scorer = scorerSupplier.scorer(c.start());
// find the closest node in the largest component to the lowest-numbered node in this
// component that has room to make a connection
graphSearcher.searchLevel(beam, scorer, 0, eps, hnsw, notFullyConnected);
graphSearcher.searchLevel(beam, scorer, level, eps, hnsw, notFullyConnected);
boolean linked = false;
while (beam.size() > 0) {
int c0node = beam.popNode();