Fix: forward search_buffer_visited_set_ in MutableVamanaIndex batch search - #384
Open
yuejiaointel wants to merge 1 commit into
Open
Fix: forward search_buffer_visited_set_ in MutableVamanaIndex batch search#384yuejiaointel wants to merge 1 commit into
yuejiaointel wants to merge 1 commit into
Conversation
…earch 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.
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
MutableVamanaIndex's batchsearch()overload ininclude/svs/index/vamana/dynamic_index.hconstructed its search buffer with only 2 ofMutableBuffer's 3 constructor arguments. This leftenable_visitedat its default (false) regardless of the caller's actualsp.search_buffer_visited_set_setting — a dead constructor argument. The staticVamanaIndex::search()(include/svs/index/vamana/index.h) already forwards this parameter correctly, so this was a static-vs-dynamic inconsistency: visited-set dedup could never be enabled via the dynamic index's batch search path, even when explicitly configured.Fix
Correctness verification
For both scenarios below, verified bit-identical top-100 result ids before vs. after the fix: 0 mismatches across 5000 queries in each case, checked via direct label-id diffs before trusting any performance number.
Performance impact (measured on dbpedia-1536-900K, deg32/cw200 Vamana graph vs. HNSW M16/efc200, AWS, matched recall)
Tests
./tests/tests "[dynamic_index],[dynamic_vamana],[graph_index]"— 80797 assertions, 6 test cases, all passing.