From 8e0c0e74340c8283a4e6dcea79db1bbd78919a0b Mon Sep 17 00:00:00 2001 From: yuejiaointel Date: Thu, 27 Aug 2026 13:02:34 -0700 Subject: [PATCH] Fix: forward search_buffer_visited_set_ in MutableVamanaIndex batch search The batch search() overload in MutableVamanaIndex constructed its search buffer with only 2 of MutableBuffer's 3 constructor arguments, so enable_visited silently defaulted to false regardless of the user-configured sp.search_buffer_visited_set_. Visited-set dedup could never be turned on via this path. The static VamanaIndex::search() already forwards this parameter correctly (index.h); this makes the dynamic index's batch search() match that pattern. --- include/svs/index/vamana/dynamic_index.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/svs/index/vamana/dynamic_index.h b/include/svs/index/vamana/dynamic_index.h index 3c9654362..a8bcd1ee4 100644 --- a/include/svs/index/vamana/dynamic_index.h +++ b/include/svs/index/vamana/dynamic_index.h @@ -534,8 +534,10 @@ class MutableVamanaIndex { threads::StaticPartition{queries.size()}, [&](const auto is, uint64_t SVS_UNUSED(tid)) { size_t num_neighbors = results.n_neighbors(); - auto buffer = - search_buffer_type{sp.buffer_config_, distance::comparator(distance_)}; + auto buffer = search_buffer_type{ + sp.buffer_config_, + distance::comparator(distance_), + sp.search_buffer_visited_set_}; auto prefetch_parameters = GreedySearchPrefetchParameters{ sp.prefetch_lookahead_, sp.prefetch_step_};