aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-02-19 14:42:19 +0000
committerArne Juul <arnej@verizonmedia.com>2020-02-19 14:42:19 +0000
commit347c2d62ef1d1a73bc53da22ce5dfa3f213946da (patch)
treea7b4e21312acc139fb8f9e72d44a2ae03b2d6681 /searchlib
parent6d06888aeadc0f10f9c5ac1d0e780fdbb00701aa (diff)
explore at least k always
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/tensor/hnsw_index.cpp2
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();
}