Skip to content

Commit 576517b

Browse files
committed
fix seen of searcher not been clear when lower_search
1 parent 4c73d79 commit 576517b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/hnsw/hnsw_const.rs

+2
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,8 @@ where
391391
index: new_index,
392392
distance,
393393
};
394+
searcher.seen.clear();
395+
searcher.seen.insert(candidate.index);
394396
// Insert the index of the nearest neighbor into the nearest pool for the next layer.
395397
searcher.nearest.push(candidate);
396398
// Insert the index into the candidate pool as well.

0 commit comments

Comments
 (0)