File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -847,6 +847,9 @@ HNSWStats HNSW::search(
847847 }
848848 int k = extract_k_from_ResultHandler (res);
849849
850+ bool search_bounded_queue_opt =
851+ params ? params->search_bounded_queue : search_bounded_queue;
852+
850853 if (upper_beam == 1 ) {
851854 // greedy search on upper levels
852855 storage_idx_t nearest = entry_point;
@@ -857,7 +860,7 @@ HNSWStats HNSW::search(
857860 }
858861
859862 int ef = std::max (params ? params->efSearch : efSearch, k);
860- if (search_bounded_queue ) { // this is the most common branch
863+ if (search_bounded_queue_opt ) { // this is the most common branch
861864 MinimaxHeap candidates (ef);
862865
863866 candidates.push (nearest, d_nearest);
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ struct ResultHandler;
4646struct SearchParametersHNSW : SearchParameters {
4747 int efSearch = 16 ;
4848 bool check_relative_distance = true ;
49+ bool search_bounded_queue = true ;
4950
5051 ~SearchParametersHNSW () {}
5152};
You can’t perform that action at this time.
0 commit comments