From c8f3aa6abaa2fc3785fe65776ecc16d99f5465c5 Mon Sep 17 00:00:00 2001 From: Ym <173550318+MaxonT@users.noreply.github.com> Date: Tue, 24 Nov 2026 21:33:51 -0600 Subject: [PATCH] docs: note that a small search window is raised to num_neighbors at search time Signed-off-by: Ym <173550318+MaxonT@users.noreply.github.com> --- bindings/python/include/svs/python/vamana.h | 5 ++++- include/svs/orchestrators/dynamic_vamana.h | 4 ++++ include/svs/orchestrators/vamana.h | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/bindings/python/include/svs/python/vamana.h b/bindings/python/include/svs/python/vamana.h index f5bc774ff..ade769110 100644 --- a/bindings/python/include/svs/python/vamana.h +++ b/bindings/python/include/svs/python/vamana.h @@ -158,7 +158,10 @@ This property is experimental and subject to change without a deprecation warnin &Manager::set_search_window_size, R"( Read/Write (int): Get/set the size of the internal search buffer. -A larger value will likely yield more accurate results at the cost of speed.)" +A larger value will likely yield more accurate results at the cost of speed. + +If this value is less than the number of neighbors requested in a search, it is +temporarily raised to that number for the search. The stored value is not changed.)" ); manager.def_property( diff --git a/include/svs/orchestrators/dynamic_vamana.h b/include/svs/orchestrators/dynamic_vamana.h index 261278d7b..d7873dc79 100644 --- a/include/svs/orchestrators/dynamic_vamana.h +++ b/include/svs/orchestrators/dynamic_vamana.h @@ -158,6 +158,10 @@ class DynamicVamana : public manager::IndexManager { /// /// @param search_window_size The new search window size. /// + /// If the search window size is less than the number of neighbors requested in a + /// search, it is temporarily set to the number of neighbors for that search. The stored + /// value is not changed. + /// DynamicVamana& set_search_window_size(size_t search_window_size) { auto parameters = get_search_parameters(); parameters.buffer_config_ = {search_window_size}; diff --git a/include/svs/orchestrators/vamana.h b/include/svs/orchestrators/vamana.h index 5787e8a7a..c2dfb1fef 100644 --- a/include/svs/orchestrators/vamana.h +++ b/include/svs/orchestrators/vamana.h @@ -331,6 +331,15 @@ class Vamana : public manager::IndexManager { ///// Vamana Interface. + /// + /// @brief Set the search window size used to process queries. + /// + /// @param search_window_size The new search window size. + /// + /// If the search window size is less than the number of neighbors requested in a + /// search, it is temporarily set to the number of neighbors for that search. The stored + /// value is not changed. + /// Vamana& set_search_window_size(size_t search_window_size) { auto parameters = get_search_parameters(); parameters.buffer_config_ = index::vamana::SearchBufferConfig{search_window_size};