summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/queryeval
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/tests/queryeval')
-rw-r--r--searchlib/src/tests/queryeval/blueprint/blueprint_test.cpp2
-rw-r--r--searchlib/src/tests/queryeval/blueprint/intermediate_blueprints_test.cpp61
-rw-r--r--searchlib/src/tests/queryeval/blueprint/leaf_blueprints_test.cpp14
-rw-r--r--searchlib/src/tests/queryeval/blueprint/mysearch.h15
-rw-r--r--searchlib/src/tests/queryeval/dot_product/dot_product_test.cpp2
-rw-r--r--searchlib/src/tests/queryeval/equiv/equiv_test.cpp2
-rw-r--r--searchlib/src/tests/queryeval/fake_searchable/fake_searchable_test.cpp14
-rw-r--r--searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp4
-rw-r--r--searchlib/src/tests/queryeval/predicate/predicate_blueprint_test.cpp11
-rw-r--r--searchlib/src/tests/queryeval/queryeval.cpp12
-rw-r--r--searchlib/src/tests/queryeval/same_element/same_element_test.cpp2
-rw-r--r--searchlib/src/tests/queryeval/simple_phrase/simple_phrase_test.cpp5
-rw-r--r--searchlib/src/tests/queryeval/sourceblender/sourceblender.cpp3
-rw-r--r--searchlib/src/tests/queryeval/termwise_eval/termwise_eval_test.cpp7
-rw-r--r--searchlib/src/tests/queryeval/weighted_set_term/weighted_set_term_test.cpp4
15 files changed, 63 insertions, 95 deletions
diff --git a/searchlib/src/tests/queryeval/blueprint/blueprint_test.cpp b/searchlib/src/tests/queryeval/blueprint/blueprint_test.cpp
index 6625a4a09ce..72a686fddda 100644
--- a/searchlib/src/tests/queryeval/blueprint/blueprint_test.cpp
+++ b/searchlib/src/tests/queryeval/blueprint/blueprint_test.cpp
@@ -188,7 +188,7 @@ public:
SearchIterator::UP
Test::create(const Blueprint &blueprint)
{
- const_cast<Blueprint &>(blueprint).fetchPostings(ExecuteInfo::TRUE);
+ const_cast<Blueprint &>(blueprint).fetchPostings(true);
SearchIterator::UP search = blueprint.createSearch(*_md, true);
MySearch::verifyAndInfer(search.get(), *_md);
return search;
diff --git a/searchlib/src/tests/queryeval/blueprint/intermediate_blueprints_test.cpp b/searchlib/src/tests/queryeval/blueprint/intermediate_blueprints_test.cpp
index 4aab1de06b3..9be238edba9 100644
--- a/searchlib/src/tests/queryeval/blueprint/intermediate_blueprints_test.cpp
+++ b/searchlib/src/tests/queryeval/blueprint/intermediate_blueprints_test.cpp
@@ -1,22 +1,31 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("blueprint_test");
-#include "mysearch.h"
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/queryeval/blueprint.h>
#include <vespa/searchlib/queryeval/intermediate_blueprints.h>
#include <vespa/searchlib/queryeval/leaf_blueprints.h>
#include <vespa/searchlib/queryeval/equiv_blueprint.h>
+#include <vespa/searchlib/queryeval/searchable.h>
+
+#include "mysearch.h"
+
#include <vespa/searchlib/queryeval/multisearch.h>
#include <vespa/searchlib/queryeval/andnotsearch.h>
+#include <vespa/searchlib/queryeval/andsearch.h>
+#include <vespa/searchlib/queryeval/orsearch.h>
+#include <vespa/searchlib/queryeval/nearsearch.h>
+#include <vespa/searchlib/queryeval/ranksearch.h>
#include <vespa/searchlib/queryeval/wand/weak_and_search.h>
#include <vespa/searchlib/queryeval/fake_requestcontext.h>
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/searchlib/test/diskindex/testdiskindex.h>
#include <vespa/searchlib/query/tree/simplequery.h>
#include <vespa/searchlib/common/bitvectoriterator.h>
+#include <vespa/searchlib/diskindex/zcpostingiterators.h>
-#include <vespa/log/log.h>
-LOG_SETUP("blueprint_test");
+#include <algorithm>
using namespace search::queryeval;
using namespace search::fef;
@@ -28,17 +37,6 @@ struct WeightOrder {
}
};
-struct RememberExecuteInfo : public MyLeaf {
- ExecuteInfo executeInfo;
-
- using MyLeaf::MyLeaf;
-
- void fetchPostings(const ExecuteInfo &execInfo) override {
- LeafBlueprint::fetchPostings(execInfo);
- executeInfo = execInfo;
- }
-};
-
Blueprint::UP ap(Blueprint *b) { return Blueprint::UP(b); }
Blueprint::UP ap(Blueprint &b) { return Blueprint::UP(&b); }
@@ -88,25 +86,6 @@ TEST("test AndNot Blueprint") {
// createSearch tested by iterator unit test
}
-TEST("test And propagates updated histestimate") {
- AndBlueprint *bp = new AndBlueprint();
- bp->setSourceId(2);
- bp->addChild(ap(MyLeafSpec(20).create<RememberExecuteInfo>()->setSourceId(2)));
- bp->addChild(ap(MyLeafSpec(200).create<RememberExecuteInfo>()->setSourceId(2)));
- bp->addChild(ap(MyLeafSpec(2000).create<RememberExecuteInfo>()->setSourceId(2)));
- bp->optimize_self();
- bp->setDocIdLimit(5000);
- bp->fetchPostings(ExecuteInfo::create(true));
- EXPECT_EQUAL(3u, bp->childCnt());
- for (uint32_t i = 0; i < bp->childCnt(); i++) {
- const RememberExecuteInfo & child = dynamic_cast<const RememberExecuteInfo &>(bp->getChild(i));
- EXPECT_EQUAL((i == 0), child.executeInfo.isStrict());
- }
- EXPECT_EQUAL(1.0, dynamic_cast<const RememberExecuteInfo &>(bp->getChild(0)).executeInfo.hitRate());
- EXPECT_EQUAL(1.0/250, dynamic_cast<const RememberExecuteInfo &>(bp->getChild(1)).executeInfo.hitRate());
- EXPECT_EQUAL(1.0/(250*25), dynamic_cast<const RememberExecuteInfo &>(bp->getChild(2)).executeInfo.hitRate());
-}
-
TEST("test And Blueprint") {
AndBlueprint b;
{ // combine
@@ -1068,7 +1047,7 @@ TEST("test WeakAnd Blueprint") {
wa.addTerm(Blueprint::UP(new FakeBlueprint(field, z)), 140);
wa.addTerm(Blueprint::UP(new FakeBlueprint(field, y)), 130);
{
- wa.fetchPostings(ExecuteInfo::TRUE);
+ wa.fetchPostings(true);
SearchIterator::UP search = wa.createSearch(*md, true);
EXPECT_TRUE(dynamic_cast<WeakAndSearch*>(search.get()) != 0);
WeakAndSearch &s = dynamic_cast<WeakAndSearch&>(*search);
@@ -1090,7 +1069,7 @@ TEST("test WeakAnd Blueprint") {
EXPECT_EQUAL(0u, terms[2].maxScore); // NB: not set
}
{
- wa.fetchPostings(ExecuteInfo::FALSE);
+ wa.fetchPostings(false);
SearchIterator::UP search = wa.createSearch(*md, false);
EXPECT_TRUE(dynamic_cast<WeakAndSearch*>(search.get()) != 0);
EXPECT_TRUE(search->seek(1));
@@ -1120,7 +1099,7 @@ TEST("require_that_unpack_of_or_over_multisearch_is_optimized") {
addChild(std::move(child1)).
addChild(std::move(child2))));
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- top_up->fetchPostings(ExecuteInfo::FALSE);
+ top_up->fetchPostings(false);
EXPECT_EQUAL("search::queryeval::OrLikeSearch<false, search::queryeval::(anonymous namespace)::FullUnpack>",
top_up->createSearch(*md, false)->getClassName());
md->resolveTermField(2)->tagAsNotNeeded();
@@ -1146,7 +1125,7 @@ TEST("require_that_unpack_of_or_is_optimized") {
addChild(ap(MyLeafSpec(20).addField(2,2).create())).
addChild(ap(MyLeafSpec(10).addField(3,3).create()))));
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- top_up->fetchPostings(ExecuteInfo::FALSE);
+ top_up->fetchPostings(false);
EXPECT_EQUAL("search::queryeval::OrLikeSearch<false, search::queryeval::(anonymous namespace)::FullUnpack>",
top_up->createSearch(*md, false)->getClassName());
md->resolveTermField(2)->tagAsNotNeeded();
@@ -1165,7 +1144,7 @@ TEST("require_that_unpack_of_and_is_optimized") {
addChild(ap(MyLeafSpec(20).addField(2,2).create())).
addChild(ap(MyLeafSpec(10).addField(3,3).create()))));
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- top_up->fetchPostings(ExecuteInfo::FALSE);
+ top_up->fetchPostings(false);
EXPECT_EQUAL("search::queryeval::AndSearchNoStrict<search::queryeval::(anonymous namespace)::FullUnpack>",
top_up->createSearch(*md, false)->getClassName());
md->resolveTermField(2)->tagAsNotNeeded();
@@ -1185,7 +1164,7 @@ TEST("require_that_unpack_optimization_is_honoured_by_parents") {
addChild(ap(MyLeafSpec(20).addField(2,2).create())).
addChild(ap(MyLeafSpec(10).addField(3,3).create()))))));
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- top_up->fetchPostings(ExecuteInfo::FALSE);
+ top_up->fetchPostings(false);
EXPECT_EQUAL("search::queryeval::AndSearchNoStrict<search::queryeval::(anonymous namespace)::FullUnpack>",
top_up->createSearch(*md, false)->getClassName());
md->resolveTermField(2)->tagAsNotNeeded();
@@ -1234,7 +1213,7 @@ TEST("require that children does not optimize when parents refuse them to") {
FieldSpec("f2", 2, idxth21), makeTerm("w2")),
1.0)));
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- top_up->fetchPostings(ExecuteInfo::FALSE);
+ top_up->fetchPostings(false);
SearchIterator::UP search = top_up->createSearch(*md, true);
EXPECT_EQUAL("search::queryeval::EquivImpl<true>", search->getClassName());
{
@@ -1272,7 +1251,7 @@ TEST("require_that_unpack_optimization_is_overruled_by_equiv") {
addChild(ap(MyLeafSpec(10).addField(3,idxth3).create()))),
1.0)));
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- top_up->fetchPostings(ExecuteInfo::FALSE);
+ top_up->fetchPostings(false);
SearchIterator::UP search = top_up->createSearch(*md, true);
EXPECT_EQUAL("search::queryeval::EquivImpl<true>", search->getClassName());
{
diff --git a/searchlib/src/tests/queryeval/blueprint/leaf_blueprints_test.cpp b/searchlib/src/tests/queryeval/blueprint/leaf_blueprints_test.cpp
index dd1d57fc296..2209ab0bfec 100644
--- a/searchlib/src/tests/queryeval/blueprint/leaf_blueprints_test.cpp
+++ b/searchlib/src/tests/queryeval/blueprint/leaf_blueprints_test.cpp
@@ -1,12 +1,10 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
+#include <vespa/log/log.h>
+LOG_SETUP("blueprint_test");
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/queryeval/blueprint.h>
#include <vespa/searchlib/queryeval/leaf_blueprints.h>
-#include <vespa/searchlib/fef/matchdata.h>
-
-#include <vespa/log/log.h>
-LOG_SETUP("blueprint_test");
+#include <vespa/vespalib/objects/visit.h>
using namespace search::queryeval;
using namespace search::fef;
@@ -29,7 +27,7 @@ Test::testEmptyBlueprint()
EXPECT_EQUAL(1u, empty.getState().field(0).getFieldId());
EXPECT_EQUAL(11u, empty.getState().field(0).getHandle());
- empty.fetchPostings(ExecuteInfo::TRUE);
+ empty.fetchPostings(true);
SearchIterator::UP search = empty.createSearch(*md, true);
SimpleResult res;
@@ -47,7 +45,7 @@ Test::testSimpleBlueprint()
SimpleBlueprint simple(a);
simple.tag("tag");
EXPECT_EQUAL("tag", simple.tag());
- simple.fetchPostings(ExecuteInfo::TRUE);
+ simple.fetchPostings(true);
SearchIterator::UP search = simple.createSearch(*md, true);
SimpleResult res;
@@ -69,7 +67,7 @@ Test::testFakeBlueprint()
TermFieldHandle handle = 0;
FakeBlueprint orig(FieldSpec("<field>", fieldId, handle), fake);
- orig.fetchPostings(ExecuteInfo::TRUE);
+ orig.fetchPostings(true);
SearchIterator::UP search = orig.createSearch(*md, true);
search->initFullRange();
EXPECT_TRUE(!search->seek(1u));
diff --git a/searchlib/src/tests/queryeval/blueprint/mysearch.h b/searchlib/src/tests/queryeval/blueprint/mysearch.h
index 82ef58147c3..dbd73b6f40e 100644
--- a/searchlib/src/tests/queryeval/blueprint/mysearch.h
+++ b/searchlib/src/tests/queryeval/blueprint/mysearch.h
@@ -1,9 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/searchlib/queryeval/blueprint.h>
#include <vespa/searchlib/queryeval/multisearch.h>
-#include <vespa/searchlib/fef/termfieldmatchdataarray.h>
-#include <vespa/searchlib/fef/matchdata.h>
#include <vespa/vespalib/objects/visit.hpp>
+#include <cassert>
namespace search::queryeval {
@@ -94,7 +93,7 @@ public:
}
}
- void visitMembers(vespalib::ObjectVisitor &visitor) const override {
+ virtual void visitMembers(vespalib::ObjectVisitor &visitor) const override {
visit(visitor, "_tag", _tag);
visit(visitor, "_isLeaf", _isLeaf);
visit(visitor, "_isStrict", _isStrict);
@@ -102,7 +101,7 @@ public:
visit(visitor, "_handles", _handles);
}
- ~MySearch() override {}
+ virtual ~MySearch() {}
};
//-----------------------------------------------------------------------------
@@ -112,7 +111,7 @@ class MyLeaf : public SimpleLeafBlueprint
typedef search::fef::TermFieldMatchDataArray TFMDA;
public:
- SearchIterator::UP
+ virtual SearchIterator::UP
createLeafSearch(const TFMDA &tfmda, bool strict) const override
{
return SearchIterator::UP(new MySearch("leaf", tfmda, strict));
@@ -156,11 +155,7 @@ public:
return *this;
}
MyLeaf *create() const {
- return create<MyLeaf>();
- }
- template<typename Leaf>
- Leaf *create() const {
- Leaf *leaf = new Leaf(_fields);
+ MyLeaf *leaf = new MyLeaf(_fields);
leaf->estimate(_estimate.estHits, _estimate.empty);
if (_cost_tier > 0) {
leaf->cost_tier(_cost_tier);
diff --git a/searchlib/src/tests/queryeval/dot_product/dot_product_test.cpp b/searchlib/src/tests/queryeval/dot_product/dot_product_test.cpp
index 7414e8b10f2..f1b6cd05772 100644
--- a/searchlib/src/tests/queryeval/dot_product/dot_product_test.cpp
+++ b/searchlib/src/tests/queryeval/dot_product/dot_product_test.cpp
@@ -58,7 +58,7 @@ struct DP {
Node::UP node = createNode();
FieldSpecList fields = FieldSpecList().add(FieldSpec(field, fieldId, handle));
queryeval::Blueprint::UP bp = searchable.createBlueprint(requestContext, fields, *node);
- bp->fetchPostings(ExecuteInfo::create(strict));
+ bp->fetchPostings(strict);
SearchIterator::UP sb = bp->createSearch(*md, strict);
EXPECT_TRUE(dynamic_cast<DotProductSearch*>(sb.get()) != 0);
sb->initFullRange();
diff --git a/searchlib/src/tests/queryeval/equiv/equiv_test.cpp b/searchlib/src/tests/queryeval/equiv/equiv_test.cpp
index ecd1c8cd218..5dac26fec22 100644
--- a/searchlib/src/tests/queryeval/equiv/equiv_test.cpp
+++ b/searchlib/src/tests/queryeval/equiv/equiv_test.cpp
@@ -50,7 +50,7 @@ Test::testEquiv()
bool strict = (i == 0);
TEST_STATE(strict ? "strict" : "non-strict");
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- bp->fetchPostings(ExecuteInfo::create(strict));
+ bp->fetchPostings(strict);
SearchIterator::UP search = bp->createSearch(*md, strict);
search->initFullRange();
diff --git a/searchlib/src/tests/queryeval/fake_searchable/fake_searchable_test.cpp b/searchlib/src/tests/queryeval/fake_searchable/fake_searchable_test.cpp
index cbad6de25bb..6fc75c8e696 100644
--- a/searchlib/src/tests/queryeval/fake_searchable/fake_searchable_test.cpp
+++ b/searchlib/src/tests/queryeval/fake_searchable/fake_searchable_test.cpp
@@ -62,7 +62,7 @@ TEST_F(FakeSearchableTest, require_that_term_search_works) {
bool strict = (i == 0);
SCOPED_TRACE(strict ? "strict" : "non-strict");
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- bp->fetchPostings(ExecuteInfo::create(strict));
+ bp->fetchPostings(strict);
SearchIterator::UP search = bp->createSearch(*md, strict);
search->initFullRange();
@@ -116,7 +116,7 @@ TEST_F(FakeSearchableTest, require_that_phrase_search_works) {
bool strict = (i == 0);
SCOPED_TRACE(strict ? "strict" : "non-strict");
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- bp->fetchPostings(ExecuteInfo::create(strict));
+ bp->fetchPostings(strict);
SearchIterator::UP search = bp->createSearch(*md, strict);
search->initFullRange();
@@ -167,7 +167,7 @@ TEST_F(FakeSearchableTest, require_that_weigheted_set_search_works) {
bool strict = (i == 0);
SCOPED_TRACE(strict ? "strict" : "non-strict");
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- bp->fetchPostings(ExecuteInfo::create(strict));
+ bp->fetchPostings(strict);
SearchIterator::UP search = bp->createSearch(*md, strict);
search->initFullRange();
@@ -238,7 +238,7 @@ TEST_F(FakeSearchableTest, require_that_multi_field_search_works) {
bool strict = (i == 0);
SCOPED_TRACE(strict ? "strict" : "non-strict");
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- bp->fetchPostings(ExecuteInfo::create(strict));
+ bp->fetchPostings(strict);
SearchIterator::UP search = bp->createSearch(*md, strict);
search->initFullRange();
@@ -322,7 +322,7 @@ TEST_F(FakeSearchableTest, require_that_phrase_with_empty_child_works) {
bool strict = (i == 0);
SCOPED_TRACE(strict ? "strict" : "non-strict");
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- bp->fetchPostings(ExecuteInfo::create(strict));
+ bp->fetchPostings(strict);
SearchIterator::UP search = bp->createSearch(*md, strict);
search->initFullRange();
@@ -342,7 +342,7 @@ TEST_F(FakeSearchableTest, require_that_match_data_is_compressed_for_attributes)
fields.add(FieldSpec("attrfoo", 1, 1));
Blueprint::UP bp = source.createBlueprint(req_ctx, fields, termNode);
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- bp->fetchPostings(ExecuteInfo::FALSE);
+ bp->fetchPostings(false);
SearchIterator::UP search = bp->createSearch(*md, false);
search->initFullRange();
EXPECT_TRUE(search->seek(5));
@@ -369,7 +369,7 @@ TEST_F(FakeSearchableTest, require_that_relevant_data_can_be_obtained_from_fake_
fields.add(FieldSpec("attrfoo", 1, 1));
Blueprint::UP bp = source.createBlueprint(req_ctx, fields, termNode);
MatchData::UP md = MatchData::makeTestInstance(100, 10);
- bp->fetchPostings(ExecuteInfo::FALSE);
+ bp->fetchPostings(false);
SearchIterator::UP search = bp->createSearch(*md, false);
EXPECT_TRUE(bp->get_attribute_search_context() != nullptr);
const auto *attr_ctx = bp->get_attribute_search_context();
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 7926a518317..607e6100f90 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
@@ -175,7 +175,7 @@ struct WandBlueprintSpec
Node::UP term = createNode();
Blueprint::UP bp = blueprint(searchable, field, *term);
MatchData::UP md(MatchData::makeTestInstance(1, 1));
- bp->fetchPostings(ExecuteInfo::TRUE);
+ bp->fetchPostings(true);
bp->setDocIdLimit(docIdLimit);
SearchIterator::UP sb = bp->createSearch(*md, true);
EXPECT_TRUE(dynamic_cast<ParallelWeakAndSearch*>(sb.get()) != 0);
@@ -190,7 +190,7 @@ struct WandBlueprintSpec
FakeResult search(Searchable &searchable, const std::string &field, const search::query::Node &term) const {
Blueprint::UP bp = blueprint(searchable, field, term);
MatchData::UP md(MatchData::makeTestInstance(1, 1));
- bp->fetchPostings(ExecuteInfo::TRUE);
+ bp->fetchPostings(true);
bp->setDocIdLimit(docIdLimit);
SearchIterator::UP sb = bp->createSearch(*md, true);
EXPECT_TRUE(dynamic_cast<ParallelWeakAndSearch*>(sb.get()) != 0);
diff --git a/searchlib/src/tests/queryeval/predicate/predicate_blueprint_test.cpp b/searchlib/src/tests/queryeval/predicate/predicate_blueprint_test.cpp
index 28b0d103040..c76873a50cd 100644
--- a/searchlib/src/tests/queryeval/predicate/predicate_blueprint_test.cpp
+++ b/searchlib/src/tests/queryeval/predicate/predicate_blueprint_test.cpp
@@ -26,7 +26,6 @@ using search::query::Weight;
using search::queryeval::FieldSpecBase;
using search::queryeval::PredicateBlueprint;
using search::queryeval::SearchIterator;
-using search::queryeval::ExecuteInfo;
namespace {
@@ -138,7 +137,7 @@ TEST_F("require that blueprint can create search", Fixture) {
f.indexDocument(doc_id, annotations);
PredicateBlueprint blueprint(f.field, f.guard(), f.query);
- blueprint.fetchPostings(ExecuteInfo::TRUE);
+ blueprint.fetchPostings(true);
TermFieldMatchDataArray tfmda;
SearchIterator::UP it = blueprint.createLeafSearch(tfmda, true);
ASSERT_TRUE(it.get());
@@ -162,7 +161,7 @@ TEST_F("require that blueprint can create more advanced search", Fixture) {
f.indexEmptyDocument(doc_id + 2);
PredicateBlueprint blueprint(f.field, f.guard(), f.query);
- blueprint.fetchPostings(ExecuteInfo::TRUE);
+ blueprint.fetchPostings(true);
TermFieldMatchDataArray tfmda;
SearchIterator::UP it = blueprint.createLeafSearch(tfmda, true);
ASSERT_TRUE(it.get());
@@ -185,7 +184,7 @@ TEST_F("require that blueprint can create NOT search", Fixture) {
f.indexDocument(doc_id, annotations);
PredicateBlueprint blueprint(f.field, f.guard(), f.query);
- blueprint.fetchPostings(ExecuteInfo::TRUE);
+ blueprint.fetchPostings(true);
TermFieldMatchDataArray tfmda;
SearchIterator::UP it = blueprint.createLeafSearch(tfmda, true);
ASSERT_TRUE(it.get());
@@ -201,7 +200,7 @@ TEST_F("require that blueprint can create compressed NOT search", Fixture) {
f.indexDocument(doc_id, annotations);
PredicateBlueprint blueprint(f.field, f.guard(), f.query);
- blueprint.fetchPostings(ExecuteInfo::TRUE);
+ blueprint.fetchPostings(true);
TermFieldMatchDataArray tfmda;
SearchIterator::UP it = blueprint.createLeafSearch(tfmda, true);
ASSERT_TRUE(it.get());
@@ -225,7 +224,7 @@ TEST_F("require that blueprint can set up search with subqueries", Fixture) {
query.getTerm()->addFeature("key2", "value", 2);
PredicateBlueprint blueprint(f.field, f.guard(), query);
- blueprint.fetchPostings(ExecuteInfo::TRUE);
+ blueprint.fetchPostings(true);
TermFieldMatchDataArray tfmda;
SearchIterator::UP it = blueprint.createLeafSearch(tfmda, true);
ASSERT_TRUE(it.get());
diff --git a/searchlib/src/tests/queryeval/queryeval.cpp b/searchlib/src/tests/queryeval/queryeval.cpp
index 26e7095dd60..56c6f7e1282 100644
--- a/searchlib/src/tests/queryeval/queryeval.cpp
+++ b/searchlib/src/tests/queryeval/queryeval.cpp
@@ -225,7 +225,7 @@ TEST("testAnd") {
auto and_b = std::make_unique<AndBlueprint>();
and_b->addChild(std::make_unique<SimpleBlueprint>(a));
and_b->addChild(std::make_unique<SimpleBlueprint>(b));
- and_b->fetchPostings(ExecuteInfo::TRUE);
+ and_b->fetchPostings(true);
SearchIterator::UP and_ab = and_b->createSearch(*md, true);
EXPECT_TRUE(dynamic_cast<const AndSearch *>(and_ab.get()) != nullptr);
@@ -252,7 +252,7 @@ TEST("testOr") {
auto or_b = std::make_unique<OrBlueprint>();
or_b->addChild(std::make_unique<SimpleBlueprint>(a));
or_b->addChild(std::make_unique<SimpleBlueprint>(b));
- or_b->fetchPostings(ExecuteInfo::TRUE);
+ or_b->fetchPostings(true);
SearchIterator::UP or_ab = or_b->createSearch(*md, true);
SimpleResult res;
@@ -366,7 +366,7 @@ TEST("testAndNot") {
auto andnot_b = std::make_unique<AndNotBlueprint>();
andnot_b->addChild(std::make_unique<SimpleBlueprint>(a));
andnot_b->addChild(std::make_unique<SimpleBlueprint>(b));
- andnot_b->fetchPostings(ExecuteInfo::TRUE);
+ andnot_b->fetchPostings(true);
SearchIterator::UP andnot_ab = andnot_b->createSearch(*md, true);
SimpleResult res;
@@ -386,7 +386,7 @@ TEST("testAndNot") {
auto andnot_b = std::make_unique<AndNotBlueprint>();
andnot_b->addChild(std::make_unique<SimpleBlueprint>(a));
andnot_b->addChild(std::make_unique<DummySingleValueBitNumericAttributeBlueprint>(b));
- andnot_b->fetchPostings(ExecuteInfo::TRUE);
+ andnot_b->fetchPostings(true);
SearchIterator::UP andnot_ab = andnot_b->createSearch(*md, true);
SimpleResult res;
@@ -412,7 +412,7 @@ TEST("testAndNot") {
auto and_b = std::make_unique<AndBlueprint>();
and_b->addChild(std::make_unique<SimpleBlueprint>(c));
and_b->addChild(std::move(andnot_b));
- and_b->fetchPostings(ExecuteInfo::TRUE);
+ and_b->fetchPostings(true);
SearchIterator::UP and_cab = and_b->createSearch(*md, true);
SimpleResult res;
@@ -437,7 +437,7 @@ TEST("testRank") {
auto rank_b = std::make_unique<RankBlueprint>();
rank_b->addChild(std::make_unique<SimpleBlueprint>(a));
rank_b->addChild(std::make_unique<SimpleBlueprint>(b));
- rank_b->fetchPostings(ExecuteInfo::TRUE);
+ rank_b->fetchPostings(true);
SearchIterator::UP rank_ab = rank_b->createSearch(*md, true);
SimpleResult res;
diff --git a/searchlib/src/tests/queryeval/same_element/same_element_test.cpp b/searchlib/src/tests/queryeval/same_element/same_element_test.cpp
index 378e16480b8..a4ca1ade999 100644
--- a/searchlib/src/tests/queryeval/same_element/same_element_test.cpp
+++ b/searchlib/src/tests/queryeval/same_element/same_element_test.cpp
@@ -37,7 +37,7 @@ std::unique_ptr<SameElementBlueprint> make_blueprint(const std::vector<FakeResul
Blueprint::UP finalize(Blueprint::UP bp, bool strict) {
Blueprint::UP result = Blueprint::optimize(std::move(bp));
- result->fetchPostings(ExecuteInfo::create(strict));
+ result->fetchPostings(strict);
result->freeze();
return result;
}
diff --git a/searchlib/src/tests/queryeval/simple_phrase/simple_phrase_test.cpp b/searchlib/src/tests/queryeval/simple_phrase/simple_phrase_test.cpp
index abaae7e4333..0743ac8408d 100644
--- a/searchlib/src/tests/queryeval/simple_phrase/simple_phrase_test.cpp
+++ b/searchlib/src/tests/queryeval/simple_phrase/simple_phrase_test.cpp
@@ -138,13 +138,12 @@ public:
void
fetchPostings(bool useBlueprint)
{
- ExecuteInfo execInfo = ExecuteInfo::create(_strict);
if (useBlueprint) {
- _phrase.fetchPostings(execInfo);
+ _phrase.fetchPostings(_strict);
return;
}
for (size_t i = 0; i < _children.size(); ++i) {
- _children[i]->fetchPostings(execInfo);
+ _children[i]->fetchPostings(_strict);
}
}
diff --git a/searchlib/src/tests/queryeval/sourceblender/sourceblender.cpp b/searchlib/src/tests/queryeval/sourceblender/sourceblender.cpp
index 64ff8898bb0..2cd687ab23a 100644
--- a/searchlib/src/tests/queryeval/sourceblender/sourceblender.cpp
+++ b/searchlib/src/tests/queryeval/sourceblender/sourceblender.cpp
@@ -9,7 +9,6 @@
#include <vespa/searchlib/test/searchiteratorverifier.h>
#include <vespa/searchlib/common/bitvectoriterator.h>
#include <vespa/searchlib/attribute/fixedsourceselector.h>
-#include <vespa/searchlib/fef/matchdata.h>
using namespace search::queryeval;
using namespace search::fef;
@@ -74,7 +73,7 @@ TEST("test strictness") {
blend_b->addChild(std::move(a_b));
blend_b->addChild(std::move(b_b));
Blueprint::UP bp(blend_b);
- bp->fetchPostings(ExecuteInfo::create(strict));
+ bp->fetchPostings(strict);
SearchIterator::UP search = bp->createSearch(*md, strict);
search->initFullRange();
SearchIterator &blend = *search;
diff --git a/searchlib/src/tests/queryeval/termwise_eval/termwise_eval_test.cpp b/searchlib/src/tests/queryeval/termwise_eval/termwise_eval_test.cpp
index 8d70daa4ca8..9f4c0058b93 100644
--- a/searchlib/src/tests/queryeval/termwise_eval/termwise_eval_test.cpp
+++ b/searchlib/src/tests/queryeval/termwise_eval/termwise_eval_test.cpp
@@ -11,7 +11,6 @@
#include <vespa/vespalib/test/insertion_operators.h>
#include <vespa/searchlib/test/searchiteratorverifier.h>
#include <vespa/searchlib/common/bitvectoriterator.h>
-#include <vespa/searchlib/fef/matchdata.h>
#include <vespa/vespalib/objects/visit.hpp>
using namespace vespalib;
@@ -82,15 +81,15 @@ struct MyBlueprint : SimpleLeafBlueprint {
setEstimate(HitEstimate(hits.size(), hits.empty()));
set_allow_termwise_eval(allow_termwise_eval);
}
- ~MyBlueprint() override;
+ ~MyBlueprint();
SearchIterator::UP createLeafSearch(const fef::TermFieldMatchDataArray &,
bool strict) const override
{
- return std::make_unique<MyTerm>(hits, strict);
+ return SearchIterator::UP(new MyTerm(hits, strict));
}
};
-MyBlueprint::~MyBlueprint() = default;
+MyBlueprint::~MyBlueprint() {}
struct MyOr : OrBlueprint {
bool use_my_value;
diff --git a/searchlib/src/tests/queryeval/weighted_set_term/weighted_set_term_test.cpp b/searchlib/src/tests/queryeval/weighted_set_term/weighted_set_term_test.cpp
index 85d2f3f4a37..78195f19427 100644
--- a/searchlib/src/tests/queryeval/weighted_set_term/weighted_set_term_test.cpp
+++ b/searchlib/src/tests/queryeval/weighted_set_term/weighted_set_term_test.cpp
@@ -66,7 +66,7 @@ struct WS {
Node::UP node = createNode();
FieldSpecList fields = FieldSpecList().add(FieldSpec(field, fieldId, handle));
queryeval::Blueprint::UP bp = searchable.createBlueprint(requestContext, fields, *node);
- bp->fetchPostings(ExecuteInfo::create(strict));
+ bp->fetchPostings(strict);
SearchIterator::UP sb = bp->createSearch(*md, strict);
return (dynamic_cast<WeightedSetTermSearch*>(sb.get()) != 0);
}
@@ -77,7 +77,7 @@ struct WS {
Node::UP node = createNode();
FieldSpecList fields = FieldSpecList().add(FieldSpec(field, fieldId, handle));
queryeval::Blueprint::UP bp = searchable.createBlueprint(requestContext, fields, *node);
- bp->fetchPostings(ExecuteInfo::create(strict));
+ bp->fetchPostings(strict);
SearchIterator::UP sb = bp->createSearch(*md, strict);
sb->initFullRange();
FakeResult result;