diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-02-02 18:53:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-02 18:53:46 +0100 |
commit | d3fc3df54ffc6867730a61f236b7f742fa9a2cbf (patch) | |
tree | f9924f2df49c6a4b6bffc6d6f738a05dbf2ff01a /searchcore/src | |
parent | cf71761504956076c26e478906754380f8944939 (diff) | |
parent | 2a051981b4f41c0d6e35f2c8d65ece7c47b994e3 (diff) |
Merge pull request #30147 from vespa-engine/geirst/unknown-hit-estimate
Tag hit estimates from attribute search contexts as unknown when appl…
Diffstat (limited to 'searchcore/src')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.cpp | 6 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/documentmetastore/search_context.h | 2 |
2 files changed, 4 insertions, 4 deletions
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; |