diff options
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp b/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp index bb3076dfe95..be53b758841 100644 --- a/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp +++ b/searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp @@ -314,7 +314,7 @@ std::vector<uint32_t> HnswIndex::find_top_k(uint32_t k, TypedCells vector, uint32_t explore_k) { std::vector<uint32_t> result; - FurthestPriQ candidates = top_k_candidates(vector, explore_k); + FurthestPriQ candidates = top_k_candidates(vector, std::max(k, explore_k)); while (candidates.size() > k) { candidates.pop(); } |