diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-01-02 22:04:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-02 22:04:58 +0100 |
commit | 3e38f14c1231e0278010fb24c348df504c64dcbc (patch) | |
tree | c65435377207151bad1121750387093632520628 /searchcore/src/tests/proton/matching | |
parent | 8408be3759a37ffd678483e6a5a1b29597f9a5fb (diff) | |
parent | bbd9f10968f929ce4b1fb81ffb519ae4d8bf6973 (diff) |
Merge pull request #11619 from vespa-engine/balder/add-executeinfo
Balder/add executeinfo
Diffstat (limited to 'searchcore/src/tests/proton/matching')
3 files changed, 12 insertions, 10 deletions
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 2d0482b0d92..201824cd764 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 @@ -4,6 +4,7 @@ #include <vespa/searchlib/queryeval/termasstring.h> #include <vespa/searchlib/queryeval/andsearchstrict.h> #include <vespa/searchlib/queryeval/fake_requestcontext.h> +#include <vespa/searchlib/fef/termfieldmatchdataarray.h> #include <vespa/searchlib/engine/trace.h> #include <vespa/vespalib/data/slime/slime.h> @@ -54,7 +55,7 @@ struct MockBlueprint : SimpleLeafBlueprint { FieldSpec spec; vespalib::string term; bool postings_fetched = false; - bool postings_strict = false; + search::queryeval::ExecuteInfo postings_strict = search::queryeval::ExecuteInfo::FALSE; MockBlueprint(const FieldSpec &spec_in, const vespalib::string &term_in) : SimpleLeafBlueprint(FieldSpecBaseList().add(spec_in)), spec(spec_in), term(term_in) { @@ -64,13 +65,13 @@ struct MockBlueprint : SimpleLeafBlueprint { bool strict) const override { if (postings_fetched) { - EXPECT_EQUAL(postings_strict, strict); + EXPECT_EQUAL(postings_strict.isStrict(), strict); } return SearchIterator::UP(new MockSearch(spec, term, strict, tfmda, postings_fetched)); } - virtual void fetchPostings(bool strict) override { - postings_strict = strict; + virtual void fetchPostings(const search::queryeval::ExecuteInfo &execInfo) override { + postings_strict = execInfo; postings_fetched = true; } }; diff --git a/searchcore/src/tests/proton/matching/query_test.cpp b/searchcore/src/tests/proton/matching/query_test.cpp index 85234ea9725..96e1eb3cc22 100644 --- a/searchcore/src/tests/proton/matching/query_test.cpp +++ b/searchcore/src/tests/proton/matching/query_test.cpp @@ -69,6 +69,7 @@ using search::queryeval::AndBlueprint; using search::queryeval::IntermediateBlueprint; using search::queryeval::AndNotBlueprint; using search::queryeval::SourceBlenderBlueprint; +using search::queryeval::ExecuteInfo; using std::string; using std::vector; @@ -454,7 +455,7 @@ SearchIterator::UP Test::getIterator(Node &node, ISearchContext &context) { _blueprint = BlueprintBuilder::build(_requestContext, node, context); - _blueprint->fetchPostings(true); + _blueprint->fetchPostings(ExecuteInfo::TRUE); SearchIterator::UP search(_blueprint->createSearch(*_match_data, true)); search->initFullRange(); return search; @@ -821,10 +822,10 @@ Test::requireThatFakeFieldSearchDumpsDiffer() Blueprint::UP l3(a.createBlueprint(requestContext, fields2, n3)); // field Blueprint::UP l4(b.createBlueprint(requestContext, fields1, n1)); // tag - l1->fetchPostings(true); - l2->fetchPostings(true); - l3->fetchPostings(true); - l4->fetchPostings(true); + 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)); diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp index 297f75054b2..5d01753dfb6 100644 --- a/searchcore/src/tests/proton/matching/querynodes_test.cpp +++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp @@ -201,7 +201,7 @@ public: MatchData::UP match_data = mdl.createMatchData(); Blueprint::UP blueprint = BlueprintBuilder::build(requestContext, node, context); - blueprint->fetchPostings(true); + blueprint->fetchPostings(search::queryeval::ExecuteInfo::TRUE); return blueprint->createSearch(*match_data, true)->asString(); } |