aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2024-04-02 11:21:55 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2024-04-02 11:21:55 +0000
commit44a8653a6949ea65e749c3fb10fa860255389eeb (patch)
treef3e3ce158b011c884b7fd6879236ab65ee93b380 /searchlib
parentcb6b91aceb83dc7bf66159b1b9a9c549d58bd9cf (diff)
remove array_cost since all strict ORs are now heaps
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/flow_tuning.h4
3 files changed, 2 insertions, 6 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp b/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp
index 8ffc43928e1..6d79f7bcb26 100644
--- a/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attribute_blueprint_factory.cpp
@@ -305,7 +305,7 @@ public:
};
double est = OrFlow::estimate_of(MyAdapter(docid_limit), _estimates);
return {est, OrFlow::cost_of(MyAdapter(docid_limit), _estimates, false),
- OrFlow::cost_of(MyAdapter(docid_limit), _estimates, true) + queryeval::flow::array_cost(est, _estimates.size())};
+ OrFlow::cost_of(MyAdapter(docid_limit), _estimates, true) + queryeval::flow::heap_cost(est, _estimates.size())};
}
SearchIterator::UP
diff --git a/searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.cpp
index 61ae7b51de1..8b5e76085d2 100644
--- a/searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.cpp
@@ -72,7 +72,7 @@ EquivBlueprint::calculate_flow_stats(uint32_t docid_limit) const
}
double est = OrFlow::estimate_of(_terms);
return {est, OrFlow::cost_of(_terms, false),
- OrFlow::cost_of(_terms, true) + flow::array_cost(est, _terms.size())};
+ OrFlow::cost_of(_terms, true) + flow::heap_cost(est, _terms.size())};
}
SearchIterator::UP
diff --git a/searchlib/src/vespa/searchlib/queryeval/flow_tuning.h b/searchlib/src/vespa/searchlib/queryeval/flow_tuning.h
index 53f2be88c1f..51e544b2e30 100644
--- a/searchlib/src/vespa/searchlib/queryeval/flow_tuning.h
+++ b/searchlib/src/vespa/searchlib/queryeval/flow_tuning.h
@@ -10,10 +10,6 @@ inline double heap_cost(double my_est, size_t num_children) {
return my_est * std::log2(std::max(size_t(1),num_children));
}
-inline double array_cost(double my_est, size_t num_children) {
- return my_est * num_children;
-}
-
/**
* The following constants and formulas were derived after analyzing term search over attributes
* (with and without fast-search) and disk index by using the iterator benchmark program: