aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2024-03-14 12:40:34 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2024-03-20 12:59:59 +0000
commit97da6db442eb0385571f834c75a8d65bd239c620 (patch)
treeb78347b8987ad09d7340b42ffdbe445438daf020 /searchcore/src
parent7938460dd3b3d72ec1900febe29c1a94db964648 (diff)
tag blueprints with strictness
The strict-aware sort function is responsible for propagating and tagging strictness throughout the blueprint tree. Use pre-tagged strictness in fetchPostings, createSearch and createFilterSearch.
Diffstat (limited to 'searchcore/src')
-rw-r--r--searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp6
-rw-r--r--searchcore/src/tests/proton/documentmetastore/lid_allocator/lid_allocator_test.cpp21
-rw-r--r--searchcore/src/tests/proton/feed_and_search/feed_and_search_test.cpp5
-rw-r--r--searchcore/src/tests/proton/index/fusionrunner_test.cpp5
-rw-r--r--searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp14
-rw-r--r--searchcore/src/tests/proton/matching/query_test.cpp40
-rw-r--r--searchcore/src/tests/proton/matching/querynodes_test.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/docsum_matcher.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.cpp15
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.h6
-rw-r--r--searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp6
14 files changed, 83 insertions, 65 deletions
diff --git a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
index c9951f0b60e..c1560d5e51c 100644
--- a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
+++ b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
@@ -187,10 +187,10 @@ assertWhiteList(const SimpleResult &exp, Blueprint::UP whiteListBlueprint, bool
{
MatchDataLayout mdl;
MatchData::UP md = mdl.createMatchData();
- whiteListBlueprint->fetchPostings(search::queryeval::ExecuteInfo::createForTest(strict));
- whiteListBlueprint->setDocIdLimit(docIdLimit);
+ whiteListBlueprint->basic_plan(strict, docIdLimit);
+ whiteListBlueprint->fetchPostings(search::queryeval::ExecuteInfo::FULL);
- SearchIterator::UP sb = whiteListBlueprint->createSearch(*md, strict);
+ SearchIterator::UP sb = whiteListBlueprint->createSearch(*md);
SimpleResult act;
act.searchStrict(*sb, docIdLimit);
EXPECT_EQ(exp, act);
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 4aefa10f5f2..19af5ca239a 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
@@ -103,20 +103,20 @@ protected:
return result;
}
- Blueprint::UP make_whitelist_blueprint(uint32_t docid_limit) {
+ Blueprint::UP make_whitelist_blueprint(bool strict, uint32_t docid_limit) {
auto blueprint = _allocator.createWhiteListBlueprint();
- blueprint->setDocIdLimit(docid_limit);
+ blueprint->basic_plan(strict, docid_limit);
return blueprint;
}
SimpleResult get_active_lids_in_search_iterator(uint32_t docid_limit, bool filter) {
- auto blueprint = make_whitelist_blueprint(docid_limit);
+ auto blueprint = make_whitelist_blueprint(true, docid_limit);
std::unique_ptr<SearchIterator> iterator;
MatchData md(MatchData::params());
if (filter) {
- iterator = blueprint->createFilterSearch(true, Blueprint::FilterConstraint::UPPER_BOUND);
+ iterator = blueprint->createFilterSearch(Blueprint::FilterConstraint::UPPER_BOUND);
} else {
- iterator = blueprint->createSearch(md, true);
+ iterator = blueprint->createSearch(md);
}
SimpleResult res;
res.search(*iterator, docid_limit);
@@ -124,8 +124,8 @@ protected:
}
Trinary filter_search_iterator_matches_any(uint32_t docid_limit) {
- auto blueprint = make_whitelist_blueprint(docid_limit);
- auto iterator = blueprint->createFilterSearch(true, Blueprint::FilterConstraint::UPPER_BOUND);
+ auto blueprint = make_whitelist_blueprint(true, docid_limit);
+ auto iterator = blueprint->createFilterSearch(Blueprint::FilterConstraint::UPPER_BOUND);
return iterator->matches_any();
}
@@ -180,10 +180,9 @@ TEST_F(LidAllocatorTest, whitelist_blueprint_can_maximize_relative_estimate)
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)
- // NOTE: optimize must be called in order to calculate the relative estimate
- EXPECT_EQ(Blueprint::optimize(make_whitelist_blueprint(1000))->estimate(), 0.1);
- EXPECT_EQ(Blueprint::optimize(make_whitelist_blueprint(200))->estimate(), 0.5);
- EXPECT_EQ(Blueprint::optimize(make_whitelist_blueprint(5))->estimate(), 1.0);
+ EXPECT_EQ(make_whitelist_blueprint(true, 1000)->estimate(), 0.1);
+ EXPECT_EQ(make_whitelist_blueprint(true, 200)->estimate(), 0.5);
+ EXPECT_EQ(make_whitelist_blueprint(true, 5)->estimate(), 1.0);
}
class LidAllocatorPerformanceTest : public LidAllocatorTest,
diff --git a/searchcore/src/tests/proton/feed_and_search/feed_and_search_test.cpp b/searchcore/src/tests/proton/feed_and_search/feed_and_search_test.cpp
index ff740dd8801..69f95ec7243 100644
--- a/searchcore/src/tests/proton/feed_and_search/feed_and_search_test.cpp
+++ b/searchcore/src/tests/proton/feed_and_search/feed_and_search_test.cpp
@@ -100,8 +100,9 @@ testSearch(Searchable &source, const string &term, uint32_t doc_id)
SimpleStringTerm node(term, field_name, 0, search::query::Weight(0));
Blueprint::UP result = source.createBlueprint(requestContext,
FieldSpecList().add(FieldSpec(field_name, 0, handle)), node);
- result->fetchPostings(search::queryeval::ExecuteInfo::TRUE);
- SearchIterator::UP search_iterator = result->createSearch(*match_data, true);
+ result->basic_plan(true, 1000);
+ result->fetchPostings(search::queryeval::ExecuteInfo::FULL);
+ SearchIterator::UP search_iterator = result->createSearch(*match_data);
search_iterator->initFullRange();
ASSERT_TRUE(search_iterator.get());
ASSERT_TRUE(search_iterator->seek(doc_id));
diff --git a/searchcore/src/tests/proton/index/fusionrunner_test.cpp b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
index dd6e8fa1c4c..c96af8e3539 100644
--- a/searchcore/src/tests/proton/index/fusionrunner_test.cpp
+++ b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
@@ -240,8 +240,9 @@ FusionRunnerTest::checkResults(uint32_t fusion_id, const uint32_t *ids, size_t s
search::queryeval::Searchable &searchable = disk_index;
SimpleStringTerm node(term, field_name, fieldId, search::query::Weight(0));
Blueprint::UP blueprint = searchable.createBlueprint(requestContext, fields, node);
- blueprint->fetchPostings(search::queryeval::ExecuteInfo::TRUE);
- SearchIterator::UP search = blueprint->createSearch(*match_data, true);
+ blueprint->basic_plan(true, 1000);
+ blueprint->fetchPostings(search::queryeval::ExecuteInfo::FULL);
+ SearchIterator::UP search = blueprint->createSearch(*match_data);
search->initFullRange();
for (size_t i = 0; i < size; ++i) {
EXPECT_TRUE(search->seek(ids[i]));
diff --git a/searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp b/searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp
index 5e10d12e16f..6f398469fd3 100644
--- a/searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp
+++ b/searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp
@@ -78,18 +78,18 @@ struct MockBlueprint : SimpleLeafBlueprint {
search::queryeval::FlowStats calculate_flow_stats(uint32_t docid_limit) const override {
return default_flow_stats(docid_limit, 756, 0);
}
- SearchIterator::UP createLeafSearch(const TermFieldMatchDataArray &tfmda, bool strict) const override
+ SearchIterator::UP createLeafSearch(const TermFieldMatchDataArray &tfmda) const override
{
if (postings_fetched) {
- EXPECT_EQUAL(postings_strict, strict);
+ EXPECT_EQUAL(postings_strict, strict());
}
- return std::make_unique<MockSearch>(spec, term, strict, tfmda, postings_fetched);
+ return std::make_unique<MockSearch>(spec, term, strict(), tfmda, postings_fetched);
}
- SearchIteratorUP createFilterSearch(bool strict, FilterConstraint constraint) const override {
- return create_default_filter(strict, constraint);
+ SearchIteratorUP createFilterSearch(FilterConstraint constraint) const override {
+ return create_default_filter(constraint);
}
- void fetchPostings(const search::queryeval::ExecuteInfo &execInfo) override {
- postings_strict = execInfo.is_strict();
+ void fetchPostings(const search::queryeval::ExecuteInfo &) override {
+ postings_strict = strict();
postings_fetched = true;
}
};
diff --git a/searchcore/src/tests/proton/matching/query_test.cpp b/searchcore/src/tests/proton/matching/query_test.cpp
index e798f87dd12..83b7e10c7a8 100644
--- a/searchcore/src/tests/proton/matching/query_test.cpp
+++ b/searchcore/src/tests/proton/matching/query_test.cpp
@@ -145,9 +145,9 @@ Fixture::getIterator(Node &node, ISearchContext &context) {
_match_data = mdl.createMatchData();
_blueprint = BlueprintBuilder::build(_requestContext, node, context);
-
- _blueprint->fetchPostings(ExecuteInfo::TRUE);
- SearchIterator::UP search(_blueprint->createSearch(*_match_data, true));
+ _blueprint->basic_plan(true, 1000);
+ _blueprint->fetchPostings(ExecuteInfo::FULL);
+ SearchIterator::UP search(_blueprint->createSearch(*_match_data));
search->initFullRange();
return search;
}
@@ -652,8 +652,8 @@ TEST("requireThatQueryGluesEverythingTogether") {
MatchData::UP md = mdl.createMatchData();
EXPECT_EQUAL(1u, md->getNumTermFields());
- query.optimize(true);
- query.fetchPostings(ExecuteInfo::TRUE);
+ query.optimize(true, true);
+ query.fetchPostings(ExecuteInfo::FULL);
SearchIterator::UP search = query.createSearch(*md);
ASSERT_TRUE(search);
}
@@ -685,7 +685,8 @@ checkQueryAddsLocation(const string &loc_in, const string &loc_out) {
MatchData::UP md = mdl.createMatchData();
EXPECT_EQUAL(2u, md->getNumTermFields());
- query.fetchPostings(ExecuteInfo::TRUE);
+ // query.optimize(true, true);
+ query.fetchPostings(ExecuteInfo::FULL);
SearchIterator::UP search = query.createSearch(*md);
ASSERT_TRUE(search);
if (!EXPECT_NOT_EQUAL(string::npos, search->asString().find(loc_out))) {
@@ -788,15 +789,20 @@ TEST("requireThatFakeFieldSearchDumpsDiffer")
Blueprint::UP l3(a.createBlueprint(requestContext, fields2, n3)); // field
Blueprint::UP l4(b.createBlueprint(requestContext, fields1, n1)); // tag
- l1->fetchPostings(ExecuteInfo::TRUE);
- l2->fetchPostings(ExecuteInfo::TRUE);
- l3->fetchPostings(ExecuteInfo::TRUE);
- l4->fetchPostings(ExecuteInfo::TRUE);
-
- SearchIterator::UP s1(l1->createSearch(*match_data, true));
- SearchIterator::UP s2(l2->createSearch(*match_data, true));
- SearchIterator::UP s3(l3->createSearch(*match_data, true));
- SearchIterator::UP s4(l4->createSearch(*match_data, true));
+ l1->basic_plan(true, 1000);
+ l2->basic_plan(true, 1000);
+ l3->basic_plan(true, 1000);
+ l4->basic_plan(true, 1000);
+
+ l1->fetchPostings(ExecuteInfo::FULL);
+ l2->fetchPostings(ExecuteInfo::FULL);
+ l3->fetchPostings(ExecuteInfo::FULL);
+ l4->fetchPostings(ExecuteInfo::FULL);
+
+ SearchIterator::UP s1(l1->createSearch(*match_data));
+ SearchIterator::UP s2(l2->createSearch(*match_data));
+ SearchIterator::UP s3(l3->createSearch(*match_data));
+ SearchIterator::UP s4(l4->createSearch(*match_data));
EXPECT_NOT_EQUAL(s1->asString(), s2->asString());
EXPECT_NOT_EQUAL(s1->asString(), s3->asString());
@@ -904,8 +910,8 @@ TEST("requireThatWhiteListBlueprintCanBeUsed")
query.reserveHandles(requestContext, context, mdl);
MatchData::UP md = mdl.createMatchData();
- query.optimize(true);
- query.fetchPostings(ExecuteInfo::TRUE);
+ query.optimize(true, true);
+ query.fetchPostings(ExecuteInfo::FULL);
SearchIterator::UP search = query.createSearch(*md);
SimpleResult exp = SimpleResult().addHit(1).addHit(5).addHit(7).addHit(11);
SimpleResult act;
diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp
index f3c986d7fe4..64c6870499c 100644
--- a/searchcore/src/tests/proton/matching/querynodes_test.cpp
+++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp
@@ -205,8 +205,9 @@ public:
MatchData::UP match_data = mdl.createMatchData();
Blueprint::UP blueprint = BlueprintBuilder::build(requestContext, node, context);
- blueprint->fetchPostings(search::queryeval::ExecuteInfo::TRUE);
- return blueprint->createSearch(*match_data, true)->asString();
+ blueprint->basic_plan(true, 1000);
+ blueprint->fetchPostings(search::queryeval::ExecuteInfo::FULL);
+ return blueprint->createSearch(*match_data)->asString();
}
template <typename Tag> string getIteratorAsString();
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
index 3f533fea28d..87004d7e5f2 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
@@ -209,11 +209,11 @@ private:
return default_flow_stats(docid_limit, _activeLids.size(), 0);
}
SearchIterator::UP
- createLeafSearch(const TermFieldMatchDataArray &tfmda, bool strict) const override
+ createLeafSearch(const TermFieldMatchDataArray &tfmda) const override
{
assert(tfmda.size() == 0);
(void) tfmda;
- return create_search_helper(strict);
+ return create_search_helper(strict());
}
public:
WhiteListBlueprint(const search::BitVector &activeLids, bool all_lids_active)
@@ -228,11 +228,11 @@ public:
bool isWhiteList() const noexcept final { return true; }
- SearchIterator::UP createFilterSearch(bool strict, FilterConstraint) const override {
+ SearchIterator::UP createFilterSearch(FilterConstraint) const override {
if (_all_lids_active) {
return std::make_unique<FullSearch>();
}
- return create_search_helper(strict);
+ return create_search_helper(strict());
}
~WhiteListBlueprint() override {
diff --git a/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp b/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp
index 66b5f067110..7157cd923da 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp
@@ -99,9 +99,11 @@ AttributeLimiter::create_match_data(size_t want_hits, size_t max_group_size, dou
FieldSpecList field; // single field API is protected
field.add(FieldSpec(_attribute_name, my_field_id, my_handle));
_blueprint = _searchable_attributes.createBlueprint(_requestContext, field, node);
+ uint32_t dummy_docid_limit = 1337;
+ _blueprint->basic_plan(strictSearch, dummy_docid_limit);
//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(),
+ auto execInfo = ExecuteInfo::create(strictSearch ? 1.0 : hit_rate, _requestContext.getDoom(),
vespalib::ThreadBundle::trivial());
_blueprint->fetchPostings(execInfo);
_estimatedHits.store(_blueprint->getState().estimate().estHits, std::memory_order_relaxed);
@@ -114,7 +116,7 @@ AttributeLimiter::create_match_data(size_t want_hits, size_t max_group_size, dou
std::unique_ptr<SearchIterator>
AttributeLimiter::create_search(size_t want_hits, size_t max_group_size, double hit_rate, bool strictSearch) {
auto [blueprint, match_data] = create_match_data(want_hits, max_group_size, hit_rate, strictSearch);
- return blueprint.createSearch(match_data, strictSearch);
+ return blueprint.createSearch(match_data);
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/docsum_matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/docsum_matcher.cpp
index 8d646597729..4d4b136aba5 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/docsum_matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/docsum_matcher.cpp
@@ -58,7 +58,7 @@ const T *as(const Blueprint &bp) { return dynamic_cast<const T *>(&bp); }
void find_matching_elements(const std::vector<uint32_t> &docs, const SameElementBlueprint &same_element, MatchingElements &result) {
search::fef::TermFieldMatchData dummy_tfmd;
- auto search = same_element.create_same_element_search(dummy_tfmd, false);
+ auto search = same_element.create_same_element_search(dummy_tfmd);
search->initRange(docs.front(), docs.back()+1);
std::vector<uint32_t> matches;
for (uint32_t doc : docs) {
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
index 19ec623635d..532ec2f63bd 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
@@ -7,6 +7,7 @@
#include <vespa/searchlib/attribute/attribute_blueprint_params.h>
#include <vespa/searchlib/attribute/attribute_operation.h>
#include <vespa/searchlib/attribute/diversity.h>
+#include <vespa/searchlib/queryeval/flow.h>
#include <vespa/searchlib/engine/trace.h>
#include <vespa/searchlib/fef/indexproperties.h>
#include <vespa/searchlib/fef/ranksetup.h>
@@ -33,6 +34,7 @@ namespace {
using search::fef::Properties;
using search::fef::RankSetup;
using search::fef::IIndexEnvironment;
+using search::queryeval::InFlow;
using namespace vespalib::literals;
@@ -204,10 +206,11 @@ MatchToolsFactory(QueryLimiter & queryLimiter,
_query.reserveHandles(_requestContext, searchContext, _mdl);
trace.addEvent(5, "Optimize query execution plan");
bool sort_by_cost = SortBlueprintsByCost::check(_queryEnv.getProperties(), rankSetup.sort_blueprints_by_cost());
- _query.optimize(sort_by_cost);
- trace.addEvent(4, "Perform dictionary lookups and posting lists initialization");
double hitRate = std::min(1.0, double(maxNumHits)/double(searchContext.getDocIdLimit()));
- _query.fetchPostings(ExecuteInfo::create(is_search, hitRate, _requestContext.getDoom(), thread_bundle));
+ auto in_flow = InFlow(is_search, hitRate);
+ _query.optimize(in_flow, sort_by_cost);
+ trace.addEvent(4, "Perform dictionary lookups and posting lists initialization");
+ _query.fetchPostings(ExecuteInfo::create(in_flow.rate(), _requestContext.getDoom(), thread_bundle));
if (is_search) {
_query.handle_global_filter(_requestContext, searchContext.getDocIdLimit(),
_attribute_blueprint_params.global_filter_lower_limit,
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.cpp b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
index 1d7a693b1c9..73e230fff98 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
@@ -198,10 +198,11 @@ Query::reserveHandles(const IRequestContext & requestContext, ISearchContext &co
}
void
-Query::optimize(bool sort_by_cost)
+Query::optimize(InFlow in_flow, bool sort_by_cost)
{
- auto opts = Blueprint::Options::all().sort_by_cost(sort_by_cost);
- _blueprint = Blueprint::optimize_and_sort(std::move(_blueprint), true, opts);
+ _in_flow = in_flow;
+ auto opts = Blueprint::Options().sort_by_cost(sort_by_cost);
+ _blueprint = Blueprint::optimize_and_sort(std::move(_blueprint), in_flow, opts);
LOG(debug, "optimized blueprint:\n%s\n", _blueprint->asString().c_str());
}
@@ -223,11 +224,11 @@ Query::handle_global_filter(const IRequestContext & requestContext, uint32_t doc
}
// optimized order may change after accounting for global filter:
trace.addEvent(5, "Optimize query execution plan to account for global filter");
- auto opts = Blueprint::Options::all().sort_by_cost(sort_by_cost);
- _blueprint = Blueprint::optimize_and_sort(std::move(_blueprint), true, opts);
+ auto opts = Blueprint::Options().sort_by_cost(sort_by_cost);
+ _blueprint = Blueprint::optimize_and_sort(std::move(_blueprint), _in_flow, opts);
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()));
+ fetchPostings(ExecuteInfo::create(_in_flow.rate(), requestContext.getDoom(), requestContext.thread_bundle()));
}
bool
@@ -288,7 +289,7 @@ Query::estimate() const
SearchIterator::UP
Query::createSearch(MatchData &md) const
{
- return _blueprint->createSearch(md, true);
+ return _blueprint->createSearch(md);
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.h b/searchcore/src/vespa/searchcore/proton/matching/query.h
index 2fc978ba3f9..03aea5a0d2d 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.h
@@ -26,7 +26,9 @@ private:
using ExecuteInfo = search::queryeval::ExecuteInfo;
using IRequestContext = search::queryeval::IRequestContext;
using GeoLocationSpec = search::common::GeoLocationSpec;
+ using InFlow = search::queryeval::InFlow;
search::query::Node::UP _query_tree;
+ InFlow _in_flow = InFlow(true);
Blueprint::UP _blueprint;
Blueprint::UP _whiteListBlueprint;
std::vector<GeoLocationSpec> _locations;
@@ -103,8 +105,8 @@ public:
* testing becomes harder. Not calling this function enables the
* test to verify the original query without optimization.
**/
- void optimize(bool sort_by_cost);
- void fetchPostings(const ExecuteInfo & executeInfo) ;
+ void optimize(InFlow in_flow, bool sort_by_cost);
+ void fetchPostings(const ExecuteInfo & executeInfo);
void handle_global_filter(const IRequestContext & requestContext, uint32_t docid_limit,
double global_filter_lower_limit, double global_filter_upper_limit,
diff --git a/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp b/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp
index 49dcb5a1f54..3bd5671f048 100644
--- a/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp
+++ b/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp
@@ -298,8 +298,10 @@ WarmupTask::run()
{
if (_warmup->warmupEndTime() != vespalib::steady_time()) {
LOG(debug, "Warming up %s", _bluePrint->asString().c_str());
- _bluePrint->fetchPostings(search::queryeval::ExecuteInfo::TRUE);
- SearchIterator::UP it(_bluePrint->createSearch(*_matchData, true));
+ uint32_t dummy_docid_limit = 1337;
+ _bluePrint->basic_plan(true, dummy_docid_limit);
+ _bluePrint->fetchPostings(search::queryeval::ExecuteInfo::FULL);
+ SearchIterator::UP it(_bluePrint->createSearch(*_matchData));
it->initFullRange();
for (uint32_t docId = it->seekFirst(1); !it->isAtEnd(); docId = it->seekNext(docId+1)) {
if (_warmup->doUnpack()) {