summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp10
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.h3
-rw-r--r--searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/numeric_range_matcher.h7
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h2
-rw-r--r--searchlib/src/vespa/searchlib/fef/indexproperties.cpp18
-rw-r--r--searchlib/src/vespa/searchlib/fef/indexproperties.h27
-rw-r--r--searchlib/src/vespa/searchlib/fef/ranksetup.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/fef/ranksetup.h6
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/blueprint.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/blueprint.h2
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/executeinfo.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/executeinfo.h22
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp12
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h4
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/same_element_blueprint.cpp6
18 files changed, 34 insertions, 112 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp b/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp
index fe5f66a05a7..66b5f067110 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp
@@ -102,7 +102,7 @@ AttributeLimiter::create_match_data(size_t want_hits, size_t max_group_size, dou
//TODO use_estimate must be switched to true quite soon
//TODO Use thread_bundle once verified(soon), _requestContext.thread_bundle()
auto execInfo = ExecuteInfo::create(strictSearch, strictSearch ? 1.0 : hit_rate, _requestContext.getDoom(),
- vespalib::ThreadBundle::trivial(), true, false);
+ vespalib::ThreadBundle::trivial());
_blueprint->fetchPostings(execInfo);
_estimatedHits.store(_blueprint->getState().estimate().estHits, std::memory_order_relaxed);
_blueprint->freeze();
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
index 68bda1eacbb..3bdf396c700 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
@@ -206,17 +206,11 @@ MatchToolsFactory(QueryLimiter & queryLimiter,
_query.optimize();
trace.addEvent(4, "Perform dictionary lookups and posting lists initialization");
double hitRate = std::min(1.0, double(maxNumHits)/double(searchContext.getDocIdLimit()));
- bool create_postinglist_when_non_strict = CreatePostingListWhenNonStrict::check(_queryEnv.getProperties(), rankSetup.create_postinglist_when_non_strict());
- bool use_estimate_for_fetch_postings = UseEstimateForFetchPostings::check(_queryEnv.getProperties(), rankSetup.use_estimate_for_fetch_postings());
- bool use_thread_bundle_for_fetch_postings = UseThreadBundleForFetchPostings::check(_queryEnv.getProperties(), rankSetup.use_thread_bundle_for_fetch_postings());
- _query.fetchPostings(ExecuteInfo::create(is_search, hitRate, _requestContext.getDoom(),
- use_thread_bundle_for_fetch_postings ? thread_bundle : vespalib::ThreadBundle::trivial(),
- create_postinglist_when_non_strict, use_estimate_for_fetch_postings));
+ _query.fetchPostings(ExecuteInfo::create(is_search, hitRate, _requestContext.getDoom(), thread_bundle));
if (is_search) {
_query.handle_global_filter(_requestContext, searchContext.getDocIdLimit(),
_attribute_blueprint_params.global_filter_lower_limit,
- _attribute_blueprint_params.global_filter_upper_limit,
- trace, create_postinglist_when_non_strict, use_estimate_for_fetch_postings);
+ _attribute_blueprint_params.global_filter_upper_limit, trace);
}
_query.freeze();
trace.addEvent(5, "Prepare shared state for multi-threaded rank executors");
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.cpp b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
index 192be93d9b8..12911520666 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
@@ -213,8 +213,7 @@ Query::fetchPostings(const ExecuteInfo & executeInfo)
void
Query::handle_global_filter(const IRequestContext & requestContext, uint32_t docid_limit,
double global_filter_lower_limit, double global_filter_upper_limit,
- search::engine::Trace& trace,
- bool create_postinglist_when_non_strict, bool use_estimate_for_fetch_postings)
+ search::engine::Trace& trace)
{
if (!handle_global_filter(*_blueprint, docid_limit, global_filter_lower_limit, global_filter_upper_limit,
requestContext.thread_bundle(), &trace))
@@ -226,8 +225,7 @@ Query::handle_global_filter(const IRequestContext & requestContext, uint32_t doc
_blueprint = Blueprint::optimize(std::move(_blueprint));
LOG(debug, "blueprint after handle_global_filter:\n%s\n", _blueprint->asString().c_str());
// strictness may change if optimized order changed:
- fetchPostings(ExecuteInfo::create(true, 1.0, requestContext.getDoom(), requestContext.thread_bundle(),
- create_postinglist_when_non_strict, use_estimate_for_fetch_postings));
+ fetchPostings(ExecuteInfo::create(true, 1.0, requestContext.getDoom(), requestContext.thread_bundle()));
}
bool
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.h b/searchcore/src/vespa/searchcore/proton/matching/query.h
index 97402d766ea..39013f99fd4 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.h
@@ -108,8 +108,7 @@ public:
void handle_global_filter(const IRequestContext & requestContext, uint32_t docid_limit,
double global_filter_lower_limit, double global_filter_upper_limit,
- search::engine::Trace& trace,
- bool create_postinglist_when_non_strict, bool use_estimate_for_fetch_postings);
+ search::engine::Trace& trace);
/**
* Calculates and handles the global filter if needed by the blueprint tree.
diff --git a/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp b/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp
index 2237096a06c..741a86b0beb 100644
--- a/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp
+++ b/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp
@@ -1113,7 +1113,7 @@ SearchContextTest::performRangeSearch(const VectorType & vec, const vespalib::st
{
for (size_t num_threads : {1,3}) {
vespalib::SimpleThreadBundle thread_bundle(num_threads);
- auto executeInfo = queryeval::ExecuteInfo::create(true, 1.0, vespalib::Doom::never(), thread_bundle, true, true);
+ auto executeInfo = queryeval::ExecuteInfo::create(true, 1.0, vespalib::Doom::never(), thread_bundle);
performSearch(executeInfo, vec, term, expected, TermType::WORD);
}
}
diff --git a/searchlib/src/vespa/searchlib/attribute/numeric_range_matcher.h b/searchlib/src/vespa/searchlib/attribute/numeric_range_matcher.h
index 93612fde893..7f1c3e31367 100644
--- a/searchlib/src/vespa/searchlib/attribute/numeric_range_matcher.h
+++ b/searchlib/src/vespa/searchlib/attribute/numeric_range_matcher.h
@@ -24,7 +24,8 @@ private:
int _limit;
size_t _max_per_group;
public:
- NumericRangeMatcher(const QueryTermSimple& queryTerm, bool avoidUndefinedInRange=false);
+ NumericRangeMatcher(const QueryTermSimple& queryTerm) : NumericRangeMatcher(queryTerm, false) {}
+ NumericRangeMatcher(const QueryTermSimple& queryTerm, bool avoidUndefinedInRange);
protected:
Int64Range getRange() const {
return {static_cast<int64_t>(_low), static_cast<int64_t>(_high)};
@@ -41,8 +42,8 @@ protected:
search::Range<BaseType>
cappedRange(bool isFloat)
{
- BaseType low = static_cast<BaseType>(_low);
- BaseType high = static_cast<BaseType>(_high);
+ auto low = static_cast<BaseType>(_low);
+ auto high = static_cast<BaseType>(_high);
BaseType numMin = std::numeric_limits<BaseType>::min();
BaseType numMax = std::numeric_limits<BaseType>::max();
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
index 83267dc4bfb..3e0794835ae 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
@@ -352,8 +352,6 @@ NumericPostingSearchContext<BaseSC, AttrT, DataT>::use_posting_lists_when_non_st
// Based on this we see that LMC = 5 * PLMC.
// The same relationship is found with the test case range_hits_ratio=[200].
- if ( ! info.create_postinglist_when_non_strict()) return false;
-
constexpr double lookup_match_constant = 5.0;
constexpr double posting_list_merge_constant = 1.0;
diff --git a/searchlib/src/vespa/searchlib/fef/indexproperties.cpp b/searchlib/src/vespa/searchlib/fef/indexproperties.cpp
index cd9dbff99cb..9c986d0bc63 100644
--- a/searchlib/src/vespa/searchlib/fef/indexproperties.cpp
+++ b/searchlib/src/vespa/searchlib/fef/indexproperties.cpp
@@ -461,24 +461,6 @@ bool AlwaysMarkPhraseExpensive::check(const Properties &props, bool fallback) {
return lookupBool(props, NAME, fallback);
}
-const vespalib::string CreatePostingListWhenNonStrict::NAME("vespa.matching.create_postinglist_when_non_strict");
-const bool CreatePostingListWhenNonStrict::DEFAULT_VALUE(true);
-bool CreatePostingListWhenNonStrict::check(const Properties &props, bool fallback) {
- return lookupBool(props, NAME, fallback);
-}
-
-const vespalib::string UseEstimateForFetchPostings::NAME("vespa.matching.use_estimate_for_fetch_postings");
-const bool UseEstimateForFetchPostings::DEFAULT_VALUE(false);
-bool UseEstimateForFetchPostings::check(const Properties &props, bool fallback) {
- return lookupBool(props, NAME, fallback);
-}
-
-const vespalib::string UseThreadBundleForFetchPostings::NAME("vespa.matching.use_thread_bundle_for_fetch_postings");
-const bool UseThreadBundleForFetchPostings::DEFAULT_VALUE(false);
-bool UseThreadBundleForFetchPostings::check(const Properties &props, bool fallback) {
- return lookupBool(props, NAME, fallback);
-}
-
} // namespace matching
namespace softtimeout {
diff --git a/searchlib/src/vespa/searchlib/fef/indexproperties.h b/searchlib/src/vespa/searchlib/fef/indexproperties.h
index 0183fdf1a13..1921f52276f 100644
--- a/searchlib/src/vespa/searchlib/fef/indexproperties.h
+++ b/searchlib/src/vespa/searchlib/fef/indexproperties.h
@@ -347,33 +347,6 @@ namespace matching {
static bool check(const Properties &props) { return check(props, DEFAULT_VALUE); }
static bool check(const Properties &props, bool fallback);
};
-
- /**
- * When enabled posting lists can be created on the fly even if iterator is not strict.
- **/
- struct CreatePostingListWhenNonStrict {
- static const vespalib::string NAME;
- static const bool DEFAULT_VALUE;
- static bool check(const Properties &props) { return check(props, DEFAULT_VALUE); }
- static bool check(const Properties &props, bool fallback);
- };
-
- /**
- * When enabled posting lists can be created on the fly even if iterator is not strict.
- **/
- struct UseEstimateForFetchPostings {
- static const vespalib::string NAME;
- static const bool DEFAULT_VALUE;
- static bool check(const Properties &props) { return check(props, DEFAULT_VALUE); }
- static bool check(const Properties &props, bool fallback);
- };
-
- struct UseThreadBundleForFetchPostings {
- static const vespalib::string NAME;
- static const bool DEFAULT_VALUE;
- static bool check(const Properties &props) { return check(props, DEFAULT_VALUE); }
- static bool check(const Properties &props, bool fallback);
- };
}
namespace softtimeout {
diff --git a/searchlib/src/vespa/searchlib/fef/ranksetup.cpp b/searchlib/src/vespa/searchlib/fef/ranksetup.cpp
index 5c28f1814d5..d6b0b900516 100644
--- a/searchlib/src/vespa/searchlib/fef/ranksetup.cpp
+++ b/searchlib/src/vespa/searchlib/fef/ranksetup.cpp
@@ -61,9 +61,6 @@ RankSetup::RankSetup(const BlueprintFactory &factory, const IIndexEnvironment &i
_compileError(false),
_degradationAscendingOrder(false),
_always_mark_phrase_expensive(false),
- _create_postinglist_when_non_strict(true),
- _use_estimate_for_fetch_postings(false),
- _use_thread_bundle_for_fetch_postings(false),
_diversityAttribute(),
_diversityMinGroups(1),
_diversityCutoffFactor(10.0),
@@ -138,9 +135,6 @@ RankSetup::configure()
_mutateOnSummary._operation = mutate::on_summary::Operation::lookup(_indexEnv.getProperties());
_mutateAllowQueryOverride = mutate::AllowQueryOverride::check(_indexEnv.getProperties());
_always_mark_phrase_expensive = matching::AlwaysMarkPhraseExpensive::check(_indexEnv.getProperties());
- _create_postinglist_when_non_strict = matching::CreatePostingListWhenNonStrict::check(_indexEnv.getProperties());
- _use_estimate_for_fetch_postings = matching::UseEstimateForFetchPostings::check(_indexEnv.getProperties());
- _use_thread_bundle_for_fetch_postings = matching::UseThreadBundleForFetchPostings::check(_indexEnv.getProperties());
}
void
diff --git a/searchlib/src/vespa/searchlib/fef/ranksetup.h b/searchlib/src/vespa/searchlib/fef/ranksetup.h
index 04659955490..d744b38cc6e 100644
--- a/searchlib/src/vespa/searchlib/fef/ranksetup.h
+++ b/searchlib/src/vespa/searchlib/fef/ranksetup.h
@@ -70,9 +70,6 @@ private:
bool _compileError;
bool _degradationAscendingOrder;
bool _always_mark_phrase_expensive;
- bool _create_postinglist_when_non_strict;
- bool _use_estimate_for_fetch_postings;
- bool _use_thread_bundle_for_fetch_postings;
vespalib::string _diversityAttribute;
uint32_t _diversityMinGroups;
double _diversityCutoffFactor;
@@ -225,9 +222,6 @@ public:
return _degradationAscendingOrder;
}
bool always_mark_phrase_expensive() const noexcept { return _always_mark_phrase_expensive; }
- bool create_postinglist_when_non_strict() const noexcept { return _create_postinglist_when_non_strict; }
- bool use_estimate_for_fetch_postings() const noexcept { return _use_estimate_for_fetch_postings; }
- bool use_thread_bundle_for_fetch_postings() const noexcept { return _use_thread_bundle_for_fetch_postings; }
/** get number of hits to collect during graceful degradation in match phase */
uint32_t getDegradationMaxHits() const {
return _degradationMaxHits;
diff --git a/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp
index 71d53ade2f7..d2b4661d9c3 100644
--- a/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp
@@ -527,10 +527,9 @@ IntermediateBlueprint::calculateState() const
}
double
-IntermediateBlueprint::computeNextHitRate(const Blueprint & child, double hit_rate, bool use_estimate) const
+IntermediateBlueprint::computeNextHitRate(const Blueprint & child, double hit_rate) const
{
(void) child;
- (void) use_estimate;
return hit_rate;
}
@@ -635,7 +634,7 @@ IntermediateBlueprint::fetchPostings(const ExecuteInfo &execInfo)
for (size_t i = 0; i < _children.size(); ++i) {
Blueprint & child = *_children[i];
child.fetchPostings(ExecuteInfo::create(execInfo.is_strict() && inheritStrict(i), nextHitRate, execInfo));
- nextHitRate = computeNextHitRate(child, nextHitRate, execInfo.use_estimate_for_fetch_postings());
+ nextHitRate = computeNextHitRate(child, nextHitRate);
}
}
diff --git a/searchlib/src/vespa/searchlib/queryeval/blueprint.h b/searchlib/src/vespa/searchlib/queryeval/blueprint.h
index 66d55015f62..0dbd7b618a7 100644
--- a/searchlib/src/vespa/searchlib/queryeval/blueprint.h
+++ b/searchlib/src/vespa/searchlib/queryeval/blueprint.h
@@ -354,7 +354,7 @@ private:
bool infer_want_global_filter() const;
size_t count_termwise_nodes(const UnpackInfo &unpack) const;
- virtual double computeNextHitRate(const Blueprint & child, double hit_rate, bool use_estimate) const;
+ virtual double computeNextHitRate(const Blueprint & child, double hit_rate) const;
protected:
// returns an empty collection if children have empty or
diff --git a/searchlib/src/vespa/searchlib/queryeval/executeinfo.cpp b/searchlib/src/vespa/searchlib/queryeval/executeinfo.cpp
index d8e38bc4ccc..c9ec6edb225 100644
--- a/searchlib/src/vespa/searchlib/queryeval/executeinfo.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/executeinfo.cpp
@@ -5,11 +5,11 @@
using vespalib::Doom;
namespace search::queryeval {
-const ExecuteInfo ExecuteInfo::TRUE(true, 1.0, Doom::never(), vespalib::ThreadBundle::trivial(), true, true);
-const ExecuteInfo ExecuteInfo::FALSE(false, 1.0, Doom::never(), vespalib::ThreadBundle::trivial(), true, true);
+const ExecuteInfo ExecuteInfo::TRUE(true, 1.0, Doom::never(), vespalib::ThreadBundle::trivial());
+const ExecuteInfo ExecuteInfo::FALSE(false, 1.0, Doom::never(), vespalib::ThreadBundle::trivial());
ExecuteInfo::ExecuteInfo() noexcept
- : ExecuteInfo(false, 1.0, Doom::never(), vespalib::ThreadBundle::trivial(), true, true)
+ : ExecuteInfo(false, 1.0, Doom::never(), vespalib::ThreadBundle::trivial())
{ }
ExecuteInfo
diff --git a/searchlib/src/vespa/searchlib/queryeval/executeinfo.h b/searchlib/src/vespa/searchlib/queryeval/executeinfo.h
index fc52d3b531e..fa2c69e0400 100644
--- a/searchlib/src/vespa/searchlib/queryeval/executeinfo.h
+++ b/searchlib/src/vespa/searchlib/queryeval/executeinfo.h
@@ -15,8 +15,6 @@ class ExecuteInfo {
public:
ExecuteInfo() noexcept;
bool is_strict() const noexcept { return _strict; }
- bool create_postinglist_when_non_strict() const noexcept { return _create_postinglist_when_non_strict; }
- bool use_estimate_for_fetch_postings() const noexcept { return _use_estimate_for_fetch_postings; }
double hit_rate() const noexcept { return _hitRate; }
const vespalib::Doom & doom() const noexcept { return _doom; }
vespalib::ThreadBundle & thread_bundle() const noexcept { return _thread_bundle; }
@@ -27,37 +25,33 @@ public:
return create(strict, org._hitRate, org);
}
static ExecuteInfo create(bool strict, double hitRate, const ExecuteInfo & org) noexcept {
- return {strict, hitRate, org._doom, org.thread_bundle(), org.create_postinglist_when_non_strict(), org.use_estimate_for_fetch_postings()};
+ return {strict, hitRate, org._doom, org.thread_bundle()};
}
- static ExecuteInfo create(bool strict, double hitRate, const vespalib::Doom & doom, vespalib::ThreadBundle & thread_bundle_in,
- bool postinglist_when_non_strict, bool use_estimate_for_fetch_postings) noexcept
+ static ExecuteInfo create(bool strict, double hitRate, const vespalib::Doom & doom,
+ vespalib::ThreadBundle & thread_bundle_in) noexcept
{
- return {strict, hitRate, doom, thread_bundle_in, postinglist_when_non_strict, use_estimate_for_fetch_postings};
+ return {strict, hitRate, doom, thread_bundle_in};
}
static ExecuteInfo createForTest(bool strict) noexcept {
return createForTest(strict, 1.0);
}
static ExecuteInfo createForTest(bool strict, double hitRate) noexcept;
static ExecuteInfo createForTest(bool strict, double hitRate, const vespalib::Doom & doom) noexcept {
- return create(strict, hitRate, doom, vespalib::ThreadBundle::trivial(), true, true);
+ return create(strict, hitRate, doom, vespalib::ThreadBundle::trivial());
}
private:
- ExecuteInfo(bool strict, double hitRate_in, const vespalib::Doom & doom, vespalib::ThreadBundle & thread_bundle_in,
- bool postinglist_when_non_strict, bool use_estimate_for_fetch_postings) noexcept
+ ExecuteInfo(bool strict, double hitRate_in, const vespalib::Doom & doom,
+ vespalib::ThreadBundle & thread_bundle_in) noexcept
: _doom(doom),
_thread_bundle(thread_bundle_in),
_hitRate(hitRate_in),
- _strict(strict),
- _create_postinglist_when_non_strict(postinglist_when_non_strict),
- _use_estimate_for_fetch_postings(use_estimate_for_fetch_postings)
+ _strict(strict)
{ }
const vespalib::Doom _doom;
vespalib::ThreadBundle & _thread_bundle;
double _hitRate;
bool _strict;
- bool _create_postinglist_when_non_strict;
- bool _use_estimate_for_fetch_postings;
};
}
diff --git a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp
index 364602cba03..b6f0f5be21f 100644
--- a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp
@@ -300,19 +300,17 @@ AndBlueprint::createFilterSearch(bool strict, FilterConstraint constraint) const
}
double
-AndBlueprint::computeNextHitRate(const Blueprint & child, double hit_rate, bool use_estimate) const {
- double estimate = use_estimate ? child.estimate() : child.hit_ratio();
- return hit_rate * estimate;
+AndBlueprint::computeNextHitRate(const Blueprint & child, double hit_rate) const {
+ return hit_rate * child.estimate();
}
double
-OrBlueprint::computeNextHitRate(const Blueprint & child, double hit_rate, bool use_estimate) const {
+OrBlueprint::computeNextHitRate(const Blueprint & child, double hit_rate) const {
// Avoid dropping hitRate to zero when meeting a conservatively high hitrate in a child.
// Happens at least when using non fast-search attributes, and with AND nodes.
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))
+ double inverse_child_estimate = 1.0 - child.estimate();
+ return (inverse_child_estimate > MIN_INVERSE_HIT_RATIO)
? hit_rate * inverse_child_estimate
: hit_rate;
}
diff --git a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h
index 14672c2a5cd..cc3da6ce983 100644
--- a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h
+++ b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h
@@ -58,7 +58,7 @@ public:
SearchIterator::UP
createFilterSearch(bool strict, FilterConstraint constraint) const override;
private:
- double computeNextHitRate(const Blueprint & child, double hit_rate, bool use_estimate) const override;
+ double computeNextHitRate(const Blueprint & child, double hit_rate) const override;
};
//-----------------------------------------------------------------------------
@@ -84,7 +84,7 @@ public:
SearchIterator::UP
createFilterSearch(bool strict, FilterConstraint constraint) const override;
private:
- double computeNextHitRate(const Blueprint & child, double hit_rate, bool use_estimate) const override;
+ double computeNextHitRate(const Blueprint & child, double hit_rate) const override;
uint8_t calculate_cost_tier() const override;
};
diff --git a/searchlib/src/vespa/searchlib/queryeval/same_element_blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/same_element_blueprint.cpp
index f0c75173671..96181377282 100644
--- a/searchlib/src/vespa/searchlib/queryeval/same_element_blueprint.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/same_element_blueprint.cpp
@@ -60,13 +60,11 @@ SameElementBlueprint::fetchPostings(const ExecuteInfo &execInfo)
{
if (_terms.empty()) return;
_terms[0]->fetchPostings(execInfo);
- double estimate = execInfo.use_estimate_for_fetch_postings() ? _terms[0]->hit_ratio() : _terms[0]->estimate();
- double hit_rate = execInfo.hit_rate() * estimate;
+ double hit_rate = execInfo.hit_rate() * _terms[0]->estimate();
for (size_t i = 1; i < _terms.size(); ++i) {
Blueprint & term = *_terms[i];
term.fetchPostings(ExecuteInfo::create(false, hit_rate, execInfo));
- estimate = execInfo.use_estimate_for_fetch_postings() ? _terms[0]->hit_ratio() : _terms[0]->estimate();
- hit_rate = hit_rate * estimate;
+ hit_rate = hit_rate * _terms[i]->estimate();
}
}