summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/matching/querynodes_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-05-18 18:31:44 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-05-18 22:54:51 +0000
commit723f2ae4228a82692831af2682942e701be7aa16 (patch)
tree8b43562b28f0da99d59c48f093ac013eb1a4a20a /searchcore/src/tests/proton/matching/querynodes_test.cpp
parent38e14d3a40775f2e010046ae36cf0505f7b6e5a6 (diff)
- Handle more than 64k hits in the element vector.
- Avoid computing all vectors in full separately and instead do an incremental inline merge with. - Also avoid requiring the searchiterator aspect on the wrappers.
Diffstat (limited to 'searchcore/src/tests/proton/matching/querynodes_test.cpp')
-rw-r--r--searchcore/src/tests/proton/matching/querynodes_test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp
index 5d01753dfb6..896b2f7e07f 100644
--- a/searchcore/src/tests/proton/matching/querynodes_test.cpp
+++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp
@@ -48,6 +48,8 @@ using search::query::QueryBuilder;
using search::queryeval::AndNotSearch;
using search::queryeval::AndSearch;
using search::queryeval::Blueprint;
+using search::queryeval::ElementIteratorWrapper;
+using search::queryeval::ElementIterator;
using search::queryeval::EmptySearch;
using search::queryeval::FakeRequestContext;
using search::queryeval::FakeResult;
@@ -290,16 +292,14 @@ SearchIterator *getParent<ONear>(SearchIterator *a, SearchIterator *b) {
template <>
SearchIterator *getParent<SameElement>(SearchIterator *a, SearchIterator *b) {
- std::vector<SearchIterator::UP> children;
- children.emplace_back(a);
- children.emplace_back(b);
- TermFieldMatchDataArray data;
static TermFieldMatchData tmd;
+ std::vector<ElementIterator::UP> children;
+ children.emplace_back(std::make_unique<ElementIteratorWrapper>(SearchIterator::UP(a), tmd));
+ children.emplace_back(std::make_unique<ElementIteratorWrapper>(SearchIterator::UP(b), tmd));
// we only check how many term/field combinations
// are below the SameElement parent:
// two terms searching in one index field
- data.add(&tmd).add(&tmd);
- return new SameElementSearch(nullptr, std::move(children), data, true);
+ return new SameElementSearch(nullptr, std::move(children), true);
}
template <>