From 14f1d444144034f1ed4edd511923dba2711dc3da Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Fri, 12 Apr 2024 16:19:01 +0000 Subject: Adjust cost model params for IN/weightedSet/dotProduct after benchmarking. --- .../src/vespa/searchlib/attribute/direct_multi_term_blueprint.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'searchlib') 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 createLeafSearch(const fef::TermFieldMatchDataArray &tfmda) const override; -- cgit v1.2.3