aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-01-03 10:18:34 +0100
committerGitHub <noreply@github.com>2020-01-03 10:18:34 +0100
commit8b9edb6f9fe919d825d73f794b57710ff4cec040 (patch)
treea1d5bdc3bb0ff9c28dce7994173b03737c509322 /searchcore/src/tests
parent48c8e7ea5ae757fda8480ce3d045711f22adc9f2 (diff)
Revert "Revert "Balder/add executeinfo""
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r--searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp2
-rw-r--r--searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp2
-rw-r--r--searchcore/src/tests/proton/index/fusionrunner_test.cpp2
-rw-r--r--searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp9
-rw-r--r--searchcore/src/tests/proton/matching/query_test.cpp11
-rw-r--r--searchcore/src/tests/proton/matching/querynodes_test.cpp2
6 files changed, 15 insertions, 13 deletions
diff --git a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
index 4dbc6be57ff..f8069dcf494 100644
--- a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
+++ b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
@@ -193,7 +193,7 @@ assertWhiteList(const SimpleResult &exp, Blueprint::UP whiteListBlueprint, bool
{
MatchDataLayout mdl;
MatchData::UP md = mdl.createMatchData();
- whiteListBlueprint->fetchPostings(strict);
+ whiteListBlueprint->fetchPostings(search::queryeval::ExecuteInfo::create(strict));
whiteListBlueprint->setDocIdLimit(docIdLimit);
SearchIterator::UP sb = whiteListBlueprint->createSearch(*md, strict);
diff --git a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
index 4580865b3a4..ca45108b698 100644
--- a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
+++ b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
@@ -125,7 +125,7 @@ void Test::testSearch(Searchable &source,
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(true);
+ result->fetchPostings(search::queryeval::ExecuteInfo::TRUE);
SearchIterator::UP search_iterator =
result->createSearch(*match_data, true);
search_iterator->initFullRange();
diff --git a/searchcore/src/tests/proton/index/fusionrunner_test.cpp b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
index 49b452aec2e..975061f9d88 100644
--- a/searchcore/src/tests/proton/index/fusionrunner_test.cpp
+++ b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
@@ -243,7 +243,7 @@ void Test::checkResults(uint32_t fusion_id, const uint32_t *ids, size_t size) {
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(true);
+ blueprint->fetchPostings(search::queryeval::ExecuteInfo::TRUE);
SearchIterator::UP search = blueprint->createSearch(*match_data, true);
search->initFullRange();
for (size_t i = 0; i < size; ++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 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();
}