diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-29 08:00:57 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-01-01 17:12:44 +0000 |
commit | 1ba19f37f37d22262b32da29372e94f87f3a97f5 (patch) | |
tree | 0a4b642467207c4bb0ecb91fd7160982f36ac318 /searchlib/src/tests/queryeval/blueprint/mysearch.h | |
parent | 064f0df79bf38da6e9c372096e25a818c2561ae3 (diff) |
Add test for AndBlueprint.fetchPostings.
Diffstat (limited to 'searchlib/src/tests/queryeval/blueprint/mysearch.h')
-rw-r--r-- | searchlib/src/tests/queryeval/blueprint/mysearch.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/searchlib/src/tests/queryeval/blueprint/mysearch.h b/searchlib/src/tests/queryeval/blueprint/mysearch.h index 520a5d8448f..82ef58147c3 100644 --- a/searchlib/src/tests/queryeval/blueprint/mysearch.h +++ b/searchlib/src/tests/queryeval/blueprint/mysearch.h @@ -94,7 +94,7 @@ public: } } - virtual void visitMembers(vespalib::ObjectVisitor &visitor) const override { + void visitMembers(vespalib::ObjectVisitor &visitor) const override { visit(visitor, "_tag", _tag); visit(visitor, "_isLeaf", _isLeaf); visit(visitor, "_isStrict", _isStrict); @@ -102,7 +102,7 @@ public: visit(visitor, "_handles", _handles); } - virtual ~MySearch() {} + ~MySearch() override {} }; //----------------------------------------------------------------------------- @@ -112,7 +112,7 @@ class MyLeaf : public SimpleLeafBlueprint typedef search::fef::TermFieldMatchDataArray TFMDA; public: - virtual SearchIterator::UP + SearchIterator::UP createLeafSearch(const TFMDA &tfmda, bool strict) const override { return SearchIterator::UP(new MySearch("leaf", tfmda, strict)); @@ -156,7 +156,11 @@ public: return *this; } MyLeaf *create() const { - MyLeaf *leaf = new MyLeaf(_fields); + return create<MyLeaf>(); + } + template<typename Leaf> + Leaf *create() const { + Leaf *leaf = new Leaf(_fields); leaf->estimate(_estimate.estHits, _estimate.empty); if (_cost_tier > 0) { leaf->cost_tier(_cost_tier); |