From 2a051981b4f41c0d6e35f2c8d65ece7c47b994e3 Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Fri, 2 Feb 2024 15:33:36 +0000 Subject: Tag hit estimates from attribute search contexts as unknown when applicable. --- .../vespa/searchcore/proton/documentmetastore/search_context.cpp | 6 +++--- .../src/vespa/searchcore/proton/documentmetastore/search_context.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'searchcore/src') diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.cpp index 3b8759aac77..a93e7543ca1 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.cpp +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.cpp @@ -113,10 +113,10 @@ SearchContext::onFind(DocId, int32_t ) const throw vespalib::IllegalStateException("The function is not implemented for documentmetastore::SearchContext"); } -unsigned int -SearchContext::approximateHits() const +search::attribute::HitEstimate +SearchContext::calc_hit_estimate() const { - return _isWord ? 1 : search::attribute::SearchContext::approximateHits(); + return _isWord ? search::attribute::HitEstimate(1) : search::attribute::SearchContext::calc_hit_estimate(); } SearchIterator::UP diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.h index 9c868bb1454..d7bd2c7b630 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.h @@ -20,7 +20,7 @@ private: document::GlobalId _gid; uint32_t _docid_limit; - unsigned int approximateHits() const override; + search::attribute::HitEstimate calc_hit_estimate() const override; int32_t onFind(DocId docId, int32_t elemId, int32_t &weight) const override; int32_t onFind(DocId docId, int32_t elemId) const override; -- cgit v1.2.3