diff options
author | Geir Storli <geirst@vespa.ai> | 2024-04-13 14:24:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-13 14:24:32 +0200 |
commit | 76a996557afe6ea647786f712005399ead314b31 (patch) | |
tree | c4529935aa7e3468f418240e2b43cb4a777eb381 /searchlib | |
parent | f33266f7782d1b690842d91601ce41c435c49c90 (diff) | |
parent | 14f1d444144034f1ed4edd511923dba2711dc3da (diff) |
Merge pull request #30904 from vespa-engine/geirst/in-operator-cost-model-adjustment
Adjust cost model params for IN/weightedSet/dotProduct after benchmar…
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/direct_multi_term_blueprint.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/direct_multi_term_blueprint.h b/searchlib/src/vespa/searchlib/attribute/direct_multi_term_blueprint.h index 1759ca71432..413d0dd0bf4 100644 --- a/searchlib/src/vespa/searchlib/attribute/direct_multi_term_blueprint.h +++ b/searchlib/src/vespa/searchlib/attribute/direct_multi_term_blueprint.h @@ -93,8 +93,10 @@ public: } }; double est = OrFlow::estimate_of(MyAdapter(docid_limit), _terms); - return {est, OrFlow::cost_of(MyAdapter(docid_limit), _terms, false), - OrFlow::cost_of(MyAdapter(docid_limit), _terms, true) + queryeval::flow::heap_cost(est, _terms.size())}; + // Iterator benchmarking has shown that non-strict cost should be 1.0. + // Program: searchlib/src/tests/queryeval/iterator_benchmark + // TODO: Add more details, and consider moving constant to flow_tuning.h + return {est, 1.0, OrFlow::cost_of(MyAdapter(docid_limit), _terms, true) + queryeval::flow::heap_cost(est, _terms.size())}; } std::unique_ptr<queryeval::SearchIterator> createLeafSearch(const fef::TermFieldMatchDataArray &tfmda) const override; |