From a61f656529cca2ce016fdbfb2ca53b7a487d73a7 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Sat, 9 Dec 2023 23:01:08 +0100 Subject: Revert "relative estimate" --- .../lid_allocator/lid_allocator_test.cpp | 23 ++------ .../proton/documentmetastore/lid_allocator.cpp | 4 -- .../tests/queryeval/blueprint/blueprint_test.cpp | 9 +-- .../blueprint/intermediate_blueprints_test.cpp | 56 ++----------------- .../queryeval/filter_search/filter_search_test.cpp | 1 - .../parallel_weak_and/parallel_weak_and_test.cpp | 2 - .../src/vespa/searchlib/queryeval/blueprint.cpp | 39 ++----------- .../src/vespa/searchlib/queryeval/blueprint.h | 29 +++------- .../queryeval/intermediate_blueprints.cpp | 64 +--------------------- .../searchlib/queryeval/intermediate_blueprints.h | 9 --- 10 files changed, 24 insertions(+), 212 deletions(-) diff --git a/searchcore/src/tests/proton/documentmetastore/lid_allocator/lid_allocator_test.cpp b/searchcore/src/tests/proton/documentmetastore/lid_allocator/lid_allocator_test.cpp index e136e491f05..b2fa8675835 100644 --- a/searchcore/src/tests/proton/documentmetastore/lid_allocator/lid_allocator_test.cpp +++ b/searchcore/src/tests/proton/documentmetastore/lid_allocator/lid_allocator_test.cpp @@ -102,15 +102,10 @@ protected: } return result; } - - Blueprint::UP make_whitelist_blueprint(uint32_t docid_limit) { + + SimpleResult get_active_lids_in_search_iterator(uint32_t docid_limit, bool filter) { auto blueprint = _allocator.createWhiteListBlueprint(); blueprint->setDocIdLimit(docid_limit); - return blueprint; - } - - SimpleResult get_active_lids_in_search_iterator(uint32_t docid_limit, bool filter) { - auto blueprint = make_whitelist_blueprint(docid_limit); std::unique_ptr iterator; MatchData md(MatchData::params()); if (filter) { @@ -124,7 +119,8 @@ protected: } Trinary filter_search_iterator_matches_any(uint32_t docid_limit) { - auto blueprint = make_whitelist_blueprint(docid_limit); + auto blueprint = _allocator.createWhiteListBlueprint(); + blueprint->setDocIdLimit(docid_limit); auto iterator = blueprint->createFilterSearch(true, Blueprint::FilterConstraint::UPPER_BOUND); return iterator->matches_any(); } @@ -174,17 +170,6 @@ TEST_F(LidAllocatorTest, filter_search_iterator_matches_all_when_all_lids_are_ac EXPECT_EQ(SimpleResult({1, 2, 3, 4}), get_active_lids_in_search_iterator(6, false)); } -TEST_F(LidAllocatorTest, whitelist_blueprint_can_maximize_relative_estimate) -{ - register_lids({ 1, 2, 3, 4 }); - activate_lids({ 1, 2, 3, 4 }, true); - // the number of hits are overestimated based on the number of - // documents that could be active (100 in this test fixture) - EXPECT_EQ(make_whitelist_blueprint(1000)->estimate(), 0.1); - EXPECT_EQ(make_whitelist_blueprint(200)->estimate(), 0.5); - EXPECT_EQ(make_whitelist_blueprint(5)->estimate(), 1.0); -} - class LidAllocatorPerformanceTest : public LidAllocatorTest, public testing::WithParamInterface { diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp index 9e9199bc8ba..95e4eac437c 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp @@ -222,10 +222,6 @@ public: setEstimate(HitEstimate(_activeLids.size(), false)); } - double calculate_relative_estimate() const final { - return abs_to_rel_est(getState().estimate().estHits, get_docid_limit()); - } - bool isWhiteList() const noexcept final { return true; } SearchIterator::UP createFilterSearch(bool strict, FilterConstraint) const override { diff --git a/searchlib/src/tests/queryeval/blueprint/blueprint_test.cpp b/searchlib/src/tests/queryeval/blueprint/blueprint_test.cpp index 2d621fa1011..372b76fa9af 100644 --- a/searchlib/src/tests/queryeval/blueprint/blueprint_test.cpp +++ b/searchlib/src/tests/queryeval/blueprint/blueprint_test.cpp @@ -22,7 +22,6 @@ class MyOr : public IntermediateBlueprint { private: public: - double calculate_relative_estimate() const final { return 0.5; } HitEstimate combine(const std::vector &data) const override { return max(data); } @@ -640,7 +639,6 @@ getExpectedBlueprint() " estimate: HitEstimate {\n" " empty: false\n" " estHits: 9\n" - " relative_estimate: 0.5\n" " cost_tier: 1\n" " tree_size: 2\n" " allow_termwise_eval: false\n" @@ -660,7 +658,6 @@ getExpectedBlueprint() " estimate: HitEstimate {\n" " empty: false\n" " estHits: 9\n" - " relative_estimate: 0.5\n" " cost_tier: 1\n" " tree_size: 1\n" " allow_termwise_eval: true\n" @@ -690,7 +687,6 @@ getExpectedSlimeBlueprint() { " '[type]': 'HitEstimate'," " empty: false," " estHits: 9," - " relative_estimate: 0.5," " cost_tier: 1," " tree_size: 2," " allow_termwise_eval: false" @@ -715,7 +711,6 @@ getExpectedSlimeBlueprint() { " '[type]': 'HitEstimate'," " empty: false," " estHits: 9," - " relative_estimate: 0.5," " cost_tier: 1," " tree_size: 1," " allow_termwise_eval: true" @@ -772,9 +767,9 @@ TEST("requireThatDocIdLimitInjectionWorks") } TEST("Control object sizes") { - EXPECT_EQUAL(40u, sizeof(Blueprint::State)); + EXPECT_EQUAL(32u, sizeof(Blueprint::State)); EXPECT_EQUAL(32u, sizeof(Blueprint)); - EXPECT_EQUAL(72u, sizeof(LeafBlueprint)); + EXPECT_EQUAL(64u, sizeof(LeafBlueprint)); } TEST_MAIN() { diff --git a/searchlib/src/tests/queryeval/blueprint/intermediate_blueprints_test.cpp b/searchlib/src/tests/queryeval/blueprint/intermediate_blueprints_test.cpp index 5078672e84e..38e7e27163d 100644 --- a/searchlib/src/tests/queryeval/blueprint/intermediate_blueprints_test.cpp +++ b/searchlib/src/tests/queryeval/blueprint/intermediate_blueprints_test.cpp @@ -157,9 +157,9 @@ TEST("test Or propagates updated histestimate") { EXPECT_TRUE(child.executeInfo.isStrict()); } EXPECT_EQUAL(1.0f, dynamic_cast(bp->getChild(0)).executeInfo.hitRate()); - EXPECT_APPROX(0.5f, dynamic_cast(bp->getChild(1)).executeInfo.hitRate(), 1e-6); - EXPECT_APPROX(0.5*3.0f/5.0f, dynamic_cast(bp->getChild(2)).executeInfo.hitRate(), 1e-6); - EXPECT_APPROX(0.5*3.0f*42.0f/(5.0f*50.0f), dynamic_cast(bp->getChild(3)).executeInfo.hitRate(), 1e-6); + EXPECT_EQUAL(1.0f, dynamic_cast(bp->getChild(1)).executeInfo.hitRate()); + EXPECT_EQUAL(3.0f/5.0f, dynamic_cast(bp->getChild(2)).executeInfo.hitRate()); + EXPECT_EQUAL(3.0f*42.0f/(5.0f*50.0f), dynamic_cast(bp->getChild(3)).executeInfo.hitRate()); } TEST("test And Blueprint") { @@ -644,11 +644,7 @@ struct make { child->setSourceId(source_tag); source_tag = invalid_source; } - if (auto *weak_and = making->asWeakAnd()) { - weak_and->addTerm(std::move(child), 1); - } else { - making->addChild(std::move(child)); - } + making->addChild(std::move(child)); return std::move(*this); } make &&leaf(uint32_t estimate) && { @@ -665,9 +661,6 @@ struct make { static make RANK() { return make(std::make_unique()); } static make ANDNOT() { return make(std::make_unique()); } static make SB(ISourceSelector &selector) { return make(std::make_unique(selector)); } - static make NEAR(uint32_t window) { return make(std::make_unique(window)); } - static make ONEAR(uint32_t window) { return make(std::make_unique(window)); } - static make WEAKAND(uint32_t n) { return make(std::make_unique(n)); } }; TEST("AND AND collapsing") { @@ -1188,45 +1181,4 @@ TEST("require that OR blueprint use saturated sum as estimate") { TEST_DO(verify_or_est({{100, false},{300, false},{200, false}}, {300, false})); } -void verify_relative_estimate(make &&mk, double expect) { - EXPECT_EQUAL(mk.making->estimate(), 0.0); - Blueprint::UP bp = std::move(mk).leafs({200,300,950}); - bp->setDocIdLimit(1000); - EXPECT_EQUAL(bp->estimate(), expect); -} - -TEST("relative estimate for OR") { - verify_relative_estimate(make::OR(), 1.0-0.8*0.7*0.5); -} - -TEST("relative estimate for AND") { - verify_relative_estimate(make::AND(), 0.2*0.3*0.5); -} - -TEST("relative estimate for RANK") { - verify_relative_estimate(make::RANK(), 0.2); -} - -TEST("relative estimate for ANDNOT") { - verify_relative_estimate(make::ANDNOT(), 0.2); -} - -TEST("relative estimate for SB") { - InvalidSelector sel; - verify_relative_estimate(make::SB(sel), 1.0-0.8*0.7*0.5); -} - -TEST("relative estimate for NEAR") { - verify_relative_estimate(make::NEAR(1), 0.2*0.3*0.5); -} - -TEST("relative estimate for ONEAR") { - verify_relative_estimate(make::ONEAR(1), 0.2*0.3*0.5); -} - -TEST("relative estimate for WEAKAND") { - verify_relative_estimate(make::WEAKAND(1000), 1.0-0.8*0.7*0.5); - verify_relative_estimate(make::WEAKAND(50), 0.05); -} - TEST_MAIN() { TEST_DEBUG("lhs.out", "rhs.out"); TEST_RUN_ALL(); } diff --git a/searchlib/src/tests/queryeval/filter_search/filter_search_test.cpp b/searchlib/src/tests/queryeval/filter_search/filter_search_test.cpp index f910ff5be1b..5933122d7a2 100644 --- a/searchlib/src/tests/queryeval/filter_search/filter_search_test.cpp +++ b/searchlib/src/tests/queryeval/filter_search/filter_search_test.cpp @@ -47,7 +47,6 @@ concept ChildCollector = requires(T a, std::unique_ptr bp) { // inherit Blueprint to capture the default filter factory struct DefaultBlueprint : Blueprint { - double calculate_relative_estimate() const override { abort(); } void optimize(Blueprint* &, OptimizePass) override { abort(); } const State &getState() const override { abort(); } void fetchPostings(const ExecuteInfo &) override { abort(); } diff --git a/searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp b/searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp index 2a59a578ec9..58f22f19da1 100644 --- a/searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp +++ b/searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp @@ -594,7 +594,6 @@ TEST_F("require that asString() on blueprint works", BlueprintAsStringFixture) " estimate: HitEstimate {\n" " empty: false\n" " estHits: 2\n" - " relative_estimate: 0.5\n" " cost_tier: 1\n" " tree_size: 2\n" " allow_termwise_eval: false\n" @@ -617,7 +616,6 @@ TEST_F("require that asString() on blueprint works", BlueprintAsStringFixture) " estimate: HitEstimate {\n" " empty: false\n" " estHits: 2\n" - " relative_estimate: 0.5\n" " cost_tier: 1\n" " tree_size: 1\n" " allow_termwise_eval: true\n" diff --git a/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp index 96c7de928e5..1088decb8d6 100644 --- a/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp +++ b/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp @@ -89,7 +89,6 @@ Blueprint::sat_sum(const std::vector &data, uint32_t docid_limit) Blueprint::State::State() noexcept : _fields(), - _relative_estimate(0.0), _estimateHits(0), _tree_size(1), _estimateEmpty(true), @@ -106,7 +105,6 @@ Blueprint::State::State(FieldSpecBase field) noexcept Blueprint::State::State(FieldSpecBaseList fields_in) noexcept : _fields(std::move(fields_in)), - _relative_estimate(0.0), _estimateHits(0), _tree_size(1), _estimateEmpty(true), @@ -352,7 +350,6 @@ Blueprint::visitMembers(vespalib::ObjectVisitor &visitor) const visitor.openStruct("estimate", "HitEstimate"); visitor.visitBool("empty", state.estimate().empty); visitor.visitInt("estHits", state.estimate().estHits); - visitor.visitFloat("relative_estimate", state.relative_estimate()); visitor.visitInt("cost_tier", state.cost_tier()); visitor.visitInt("tree_size", state.tree_size()); visitor.visitBool("allow_termwise_eval", state.allow_termwise_eval()); @@ -376,10 +373,8 @@ StateCache::updateState() const void StateCache::notifyChange() { assert(!frozen()); - if (!_stale) { - Blueprint::notifyChange(); - _stale = true; - } + Blueprint::notifyChange(); + _stale = true; } } // namespace blueprint @@ -391,11 +386,9 @@ IntermediateBlueprint::~IntermediateBlueprint() = default; void IntermediateBlueprint::setDocIdLimit(uint32_t limit) noexcept { - if (limit != get_docid_limit()) { - Blueprint::setDocIdLimit(limit); - for (Blueprint::UP &child : _children) { - child->setDocIdLimit(limit); - } + Blueprint::setDocIdLimit(limit); + for (Blueprint::UP &child : _children) { + child->setDocIdLimit(limit); } } @@ -518,7 +511,6 @@ IntermediateBlueprint::calculateState() const { State state(exposeFields()); state.estimate(calculateEstimate()); - state.relative_estimate(calculate_relative_estimate()); state.cost_tier(calculate_cost_tier()); state.allow_termwise_eval(infer_allow_termwise_eval()); state.want_global_filter(infer_want_global_filter()); @@ -710,27 +702,6 @@ IntermediateBlueprint::calculateUnpackInfo(const fef::MatchData & md) const //----------------------------------------------------------------------------- -void -LeafBlueprint::setDocIdLimit(uint32_t limit) noexcept { - if (limit != get_docid_limit()) { - Blueprint::setDocIdLimit(limit); - _state.relative_estimate(calculate_relative_estimate()); - notifyChange(); - } -} - -double -LeafBlueprint::calculate_relative_estimate() const -{ - double rel_est = abs_to_rel_est(_state.estimate().estHits, get_docid_limit()); - if (rel_est > 0.9) { - // Assume we do not really know how much we are matching when - // we claim to match 'everything' - return 0.5; - } - return rel_est; -} - void LeafBlueprint::fetchPostings(const ExecuteInfo &) { diff --git a/searchlib/src/vespa/searchlib/queryeval/blueprint.h b/searchlib/src/vespa/searchlib/queryeval/blueprint.h index 3261d380f36..a61d435ac25 100644 --- a/searchlib/src/vespa/searchlib/queryeval/blueprint.h +++ b/searchlib/src/vespa/searchlib/queryeval/blueprint.h @@ -29,7 +29,6 @@ class MatchingElementsSearch; class LeafBlueprint; class IntermediateBlueprint; class SourceBlenderBlueprint; -class WeakAndBlueprint; class AndBlueprint; class AndNotBlueprint; class OrBlueprint; @@ -75,7 +74,6 @@ public: { private: FieldSpecBaseList _fields; - double _relative_estimate; uint32_t _estimateHits; uint32_t _tree_size : 20; bool _estimateEmpty : 1; @@ -111,9 +109,6 @@ public: return nullptr; } - void relative_estimate(double value) noexcept { _relative_estimate = value; } - double relative_estimate() const noexcept { return _relative_estimate; } - void estimate(HitEstimate est) noexcept { _estimateHits = est.estHits; _estimateEmpty = est.empty; @@ -122,9 +117,10 @@ public: HitEstimate estimate() const noexcept { return {_estimateHits, _estimateEmpty}; } double hit_ratio(uint32_t docid_limit) const noexcept { - return abs_to_rel_est(_estimateHits, docid_limit); + uint32_t total_hits = _estimateHits; + uint32_t total_docs = std::max(total_hits, docid_limit); + return (total_docs == 0) ? 0.0 : double(total_hits) / double(total_docs); } - void tree_size(uint32_t value) noexcept { assert(value < 0x100000); _tree_size = value; @@ -137,12 +133,6 @@ public: void cost_tier(uint8_t value) noexcept { _cost_tier = value; } uint8_t cost_tier() const noexcept { return _cost_tier; } }; - - // converts from an absolute to a relative estimate - static double abs_to_rel_est(uint32_t est, uint32_t docid_limit) noexcept { - uint32_t total_docs = std::max(est, docid_limit); - return (total_docs == 0) ? 0.0 : double(est) / double(total_docs); - } // utility that just takes maximum estimate static HitEstimate max(const std::vector &data); @@ -248,9 +238,9 @@ public: virtual const State &getState() const = 0; const Blueprint &root() const; - double hit_ratio() const { return getState().hit_ratio(_docid_limit); } - double estimate() const { return getState().relative_estimate(); } - virtual double calculate_relative_estimate() const = 0; + double hit_ratio() const noexcept { return getState().hit_ratio(_docid_limit); } + // TODO Call getState().estimate() when it return a normalized estimate + double estimate() const noexcept { return getState().hit_ratio(_docid_limit); } virtual void fetchPostings(const ExecuteInfo &execInfo) = 0; virtual void freeze() = 0; @@ -282,7 +272,6 @@ public: bool isAndNot() const noexcept { return const_cast(this)->asAndNot() != nullptr; } virtual OrBlueprint * asOr() noexcept { return nullptr; } virtual SourceBlenderBlueprint * asSourceBlender() noexcept { return nullptr; } - virtual WeakAndBlueprint * asWeakAnd() noexcept { return nullptr; } virtual bool isRank() const noexcept { return false; } virtual const attribute::ISearchContext *get_attribute_search_context() const noexcept { return nullptr; } @@ -368,7 +357,7 @@ public: Blueprint::UP removeChild(size_t n); Blueprint::UP removeLastChild() { return removeChild(childCnt() - 1); } SearchIteratorUP createSearch(fef::MatchData &md, bool strict) const override; - + virtual HitEstimate combine(const std::vector &data) const = 0; virtual FieldSpecBaseList exposeFields() const = 0; virtual void sort(Children &children) const = 0; @@ -394,7 +383,6 @@ protected: void optimize(Blueprint* &self, OptimizePass pass) final; void setEstimate(HitEstimate est) { _state.estimate(est); - _state.relative_estimate(calculate_relative_estimate()); notifyChange(); } void set_cost_tier(uint32_t value); @@ -425,8 +413,7 @@ protected: public: ~LeafBlueprint() override = default; const State &getState() const final { return _state; } - void setDocIdLimit(uint32_t limit) noexcept final; - double calculate_relative_estimate() const override; + void setDocIdLimit(uint32_t limit) noexcept final { Blueprint::setDocIdLimit(limit); } void fetchPostings(const ExecuteInfo &execInfo) override; void freeze() final; SearchIteratorUP createSearch(fef::MatchData &md, bool strict) const override; diff --git a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp index 7d992b510b5..c4044ba3d00 100644 --- a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp +++ b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp @@ -81,35 +81,10 @@ need_normal_features_for_children(const IntermediateBlueprint &blueprint, fef::M } } -double rel_est_first_child(const Blueprint::Children &children) { - return children.empty() ? 0.0 : children[0]->getState().relative_estimate(); -} - -double rel_est_and(const Blueprint::Children &children) { - double flow = 1.0; - for (const Blueprint::UP &child: children) { - flow *= child->getState().relative_estimate(); - } - return children.empty() ? 0.0 : flow; -} - -double rel_est_or(const Blueprint::Children &children) { - double flow = 1.0; - for (const Blueprint::UP &child: children) { - flow *= (1.0 - child->getState().relative_estimate()); - } - return (1.0 - flow); -} - } // namespace search::queryeval:: //----------------------------------------------------------------------------- -double -AndNotBlueprint::calculate_relative_estimate() const { - return rel_est_first_child(get_children()); -} - Blueprint::HitEstimate AndNotBlueprint::combine(const std::vector &data) const { @@ -213,11 +188,6 @@ AndNotBlueprint::createFilterSearch(bool strict, FilterConstraint constraint) co //----------------------------------------------------------------------------- -double -AndBlueprint::calculate_relative_estimate() const { - return rel_est_and(get_children()); -} - Blueprint::HitEstimate AndBlueprint::combine(const std::vector &data) const { @@ -312,7 +282,7 @@ OrBlueprint::computeNextHitRate(const Blueprint & child, double hit_rate, bool u constexpr double MIN_INVERSE_HIT_RATIO = 0.10; double estimate = use_estimate ? child.estimate() : child.hit_ratio(); double inverse_child_estimate = 1.0 - estimate; - return (use_estimate || (inverse_child_estimate > MIN_INVERSE_HIT_RATIO)) + return (inverse_child_estimate > MIN_INVERSE_HIT_RATIO) ? hit_rate * inverse_child_estimate : hit_rate; } @@ -321,11 +291,6 @@ OrBlueprint::computeNextHitRate(const Blueprint & child, double hit_rate, bool u OrBlueprint::~OrBlueprint() = default; -double -OrBlueprint::calculate_relative_estimate() const { - return rel_est_or(get_children()); -} - Blueprint::HitEstimate OrBlueprint::combine(const std::vector &data) const { @@ -417,13 +382,6 @@ OrBlueprint::calculate_cost_tier() const //----------------------------------------------------------------------------- WeakAndBlueprint::~WeakAndBlueprint() = default; -double -WeakAndBlueprint::calculate_relative_estimate() const { - double child_est = rel_est_or(get_children()); - double my_est = abs_to_rel_est(_n, get_docid_limit()); - return std::min(my_est, child_est); -} - Blueprint::HitEstimate WeakAndBlueprint::combine(const std::vector &data) const { @@ -483,11 +441,6 @@ WeakAndBlueprint::createFilterSearch(bool strict, FilterConstraint constraint) c //----------------------------------------------------------------------------- -double -NearBlueprint::calculate_relative_estimate() const { - return rel_est_and(get_children()); -} - Blueprint::HitEstimate NearBlueprint::combine(const std::vector &data) const { @@ -541,11 +494,6 @@ NearBlueprint::createFilterSearch(bool strict, FilterConstraint constraint) cons //----------------------------------------------------------------------------- -double -ONearBlueprint::calculate_relative_estimate() const { - return rel_est_and(get_children()); -} - Blueprint::HitEstimate ONearBlueprint::combine(const std::vector &data) const { @@ -602,11 +550,6 @@ ONearBlueprint::createFilterSearch(bool strict, FilterConstraint constraint) con //----------------------------------------------------------------------------- -double -RankBlueprint::calculate_relative_estimate() const { - return rel_est_first_child(get_children()); -} - Blueprint::HitEstimate RankBlueprint::combine(const std::vector &data) const { @@ -699,11 +642,6 @@ SourceBlenderBlueprint::SourceBlenderBlueprint(const ISourceSelector &selector) SourceBlenderBlueprint::~SourceBlenderBlueprint() = default; -double -SourceBlenderBlueprint::calculate_relative_estimate() const { - return rel_est_or(get_children()); -} - Blueprint::HitEstimate SourceBlenderBlueprint::combine(const std::vector &data) const { diff --git a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h index b9306ea307d..1d88b3b21eb 100644 --- a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h +++ b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h @@ -15,7 +15,6 @@ class AndNotBlueprint : public IntermediateBlueprint { public: bool supports_termwise_children() const override { return true; } - double calculate_relative_estimate() const final; HitEstimate combine(const std::vector &data) const override; FieldSpecBaseList exposeFields() const override; void optimize_self(OptimizePass pass) override; @@ -42,7 +41,6 @@ class AndBlueprint : public IntermediateBlueprint { public: bool supports_termwise_children() const override { return true; } - double calculate_relative_estimate() const final; HitEstimate combine(const std::vector &data) const override; FieldSpecBaseList exposeFields() const override; void optimize_self(OptimizePass pass) override; @@ -67,7 +65,6 @@ class OrBlueprint : public IntermediateBlueprint public: ~OrBlueprint() override; bool supports_termwise_children() const override { return true; } - double calculate_relative_estimate() const final; HitEstimate combine(const std::vector &data) const override; FieldSpecBaseList exposeFields() const override; void optimize_self(OptimizePass pass) override; @@ -94,13 +91,11 @@ private: std::vector _weights; public: - double calculate_relative_estimate() const final; HitEstimate combine(const std::vector &data) const override; FieldSpecBaseList exposeFields() const override; void sort(Children &children) const override; bool inheritStrict(size_t i) const override; bool always_needs_unpack() const override; - WeakAndBlueprint * asWeakAnd() noexcept final { return this; } SearchIterator::UP createIntermediateSearch(MultiSearch::Children subSearches, bool strict, fef::MatchData &md) const override; @@ -124,7 +119,6 @@ private: uint32_t _window; public: - double calculate_relative_estimate() const final; HitEstimate combine(const std::vector &data) const override; FieldSpecBaseList exposeFields() const override; bool should_optimize_children() const override { return false; } @@ -147,7 +141,6 @@ private: uint32_t _window; public: - double calculate_relative_estimate() const final; HitEstimate combine(const std::vector &data) const override; FieldSpecBaseList exposeFields() const override; bool should_optimize_children() const override { return false; } @@ -167,7 +160,6 @@ public: class RankBlueprint final : public IntermediateBlueprint { public: - double calculate_relative_estimate() const final; HitEstimate combine(const std::vector &data) const override; FieldSpecBaseList exposeFields() const override; void optimize_self(OptimizePass pass) override; @@ -195,7 +187,6 @@ private: public: explicit SourceBlenderBlueprint(const ISourceSelector &selector) noexcept; ~SourceBlenderBlueprint() override; - double calculate_relative_estimate() const final; HitEstimate combine(const std::vector &data) const override; FieldSpecBaseList exposeFields() const override; void sort(Children &children) const override; -- cgit v1.2.3