diff options
author | Geir Storli <geirst@yahooinc.com> | 2024-04-16 15:58:48 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahooinc.com> | 2024-04-16 15:58:48 +0000 |
commit | d4885cda1fee09b8c2828f27a6d06d177a9b8bec (patch) | |
tree | 394da3975e44fedd025999405ef362864a05f2a9 /searchcore/src | |
parent | 4212a0b72398dbd5c555f23f3501d265b9a8724e (diff) |
Adjust strict cost of bitvector after benchmarking.
A bitvector is used to track active lids and is always part of a query.
Diffstat (limited to 'searchcore/src')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp index 87004d7e5f2..0c986422be6 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp @@ -2,10 +2,11 @@ #include "lid_allocator.h" #include <vespa/searchlib/common/bitvectoriterator.h> -#include <vespa/searchlib/fef/termfieldmatchdataarray.h> #include <vespa/searchlib/fef/matchdata.h> -#include <vespa/searchlib/queryeval/full_search.h> +#include <vespa/searchlib/fef/termfieldmatchdataarray.h> #include <vespa/searchlib/queryeval/blueprint.h> +#include <vespa/searchlib/queryeval/flow_tuning.h> +#include <vespa/searchlib/queryeval/full_search.h> #include <mutex> #include <vespa/log/log.h> @@ -19,6 +20,8 @@ using search::queryeval::SearchIterator; using search::queryeval::SimpleLeafBlueprint; using vespalib::GenerationHolder; +using namespace search::queryeval::flow; + namespace proton::documentmetastore { LidAllocator::LidAllocator(uint32_t size, @@ -206,7 +209,8 @@ private: return search::BitVectorIterator::create(&_activeLids, get_docid_limit(), *tfmd, strict); } FlowStats calculate_flow_stats(uint32_t docid_limit) const override { - return default_flow_stats(docid_limit, _activeLids.size(), 0); + double rel_est = abs_to_rel_est(_activeLids.size(), docid_limit); + return {rel_est, bitvector_cost(), bitvector_strict_cost(rel_est)}; } SearchIterator::UP createLeafSearch(const TermFieldMatchDataArray &tfmda) const override |