From 8c97d855f4d42cc146c0d54839b5e9e94e9f92b2 Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Thu, 26 Oct 2023 15:17:54 +0000 Subject: 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. --- searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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::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::max())); } -- cgit v1.2.3