aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2023-10-26 15:17:54 +0000
committerGeir Storli <geirst@yahooinc.com>2023-10-26 15:17:54 +0000
commit8c97d855f4d42cc146c0d54839b5e9e94e9f92b2 (patch)
treeb2aee566ddfbd72ebf4035822a1020048eebefbd /searchlib
parent907d16021c13860a3f35969ab30b98135f6c52bd (diff)
Use the entire docid range as approx hits with non-btree dictionary.
This fixes a bug introduced in the improved modeling of match strategies to use in numeric range search.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp
index 9144a85d0e1..964101ed3a6 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp
@@ -206,8 +206,10 @@ PostingListSearchContextT<DataT>::approximateHits() const
if (_uniqueValues == 0u) {
} else if (_uniqueValues == 1u) {
numHits = singleHits();
- } else {
+ } else if (_dictionary.get_has_btree_dictionary()) {
numHits = estimated_hits_in_range();
+ } else {
+ numHits = _docIdLimit;
}
return std::min(numHits, size_t(std::numeric_limits<uint32_t>::max()));
}