diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-01-03 10:18:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-03 10:18:34 +0100 |
commit | 8b9edb6f9fe919d825d73f794b57710ff4cec040 (patch) | |
tree | a1d5bdc3bb0ff9c28dce7994173b03737c509322 /searchlib/src/tests/attribute/searchcontext | |
parent | 48c8e7ea5ae757fda8480ce3d045711f22adc9f2 (diff) |
Revert "Revert "Balder/add executeinfo""
Diffstat (limited to 'searchlib/src/tests/attribute/searchcontext')
-rw-r--r-- | searchlib/src/tests/attribute/searchcontext/searchcontext.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp b/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp index b518d683409..7d4a2d63355 100644 --- a/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp +++ b/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp @@ -12,6 +12,7 @@ #include <vespa/searchlib/fef/termfieldmatchdataarray.h> #include <vespa/searchlib/queryeval/hitcollector.h> #include <vespa/searchlib/queryeval/emptysearch.h> +#include <vespa/searchlib/queryeval/executeinfo.h> #include <vespa/vespalib/testkit/testapp.h> #include <vespa/vespalib/util/compress.h> #include <vespa/searchlib/test/searchiteratorverifier.h> @@ -204,7 +205,7 @@ private: // test search iterator unpacking void fillForSearchIteratorUnpackingTest(IntegerAttribute * ia, bool extra); void testSearchIteratorUnpacking(const AttributePtr & ptr, SearchContext & sc, bool extra, bool strict) { - sc.fetchPostings(strict); + sc.fetchPostings(queryeval::ExecuteInfo::create(strict, 1.0)); for (bool withElementId : {false, true}) { testSearchIteratorUnpacking(ptr, sc, extra, strict, withElementId); } @@ -439,7 +440,7 @@ SearchContextTest::performSearch(const V & vec, const T & term, QueryTermSimple: { TermFieldMatchData dummy; SearchContextPtr sc = getSearch(vec, term, termType); - sc->fetchPostings(true); + sc->fetchPostings(queryeval::ExecuteInfo::TRUE); SearchBasePtr sb = sc->createIterator(&dummy, true); ResultSetPtr rs = performSearch(*sb, vec.getNumDocs()); return rs; @@ -495,7 +496,7 @@ SearchContextTest::testFind(const PostingList<V, T> & pl) { { // strict search iterator SearchContextPtr sc = getSearch(pl.getAttribute(), pl.getValue()); - sc->fetchPostings(true); + sc->fetchPostings(queryeval::ExecuteInfo::TRUE); TermFieldMatchData dummy; SearchBasePtr sb = sc->createIterator(&dummy, true); ResultSetPtr rs = performSearch(*sb, pl.getAttribute().getNumDocs()); @@ -624,7 +625,7 @@ public: ~Verifier() override; SearchIterator::UP create(bool strict) const override { - _sc->fetchPostings(strict); + _sc->fetchPostings(queryeval::ExecuteInfo::create(strict, 1.0)); auto search = _sc->createIterator(&_dummy, strict); if (_withElementId) { search = std::make_unique<attribute::ElementIterator>(std::move(search), *_sc, _dummy); @@ -741,7 +742,7 @@ SearchContextTest::testStrictSearchIterator(SearchContext & threeHits, { TermFieldMatchData dummy; { // search for value with 3 hits - threeHits.fetchPostings(true); + threeHits.fetchPostings(queryeval::ExecuteInfo::TRUE); SearchBasePtr sb = threeHits.createIterator(&dummy, true); sb->initRange(1, threeHits.attribute().getCommittedDocIdLimit()); EXPECT_TRUE(typeTester.matches(*sb)); @@ -762,7 +763,7 @@ SearchContextTest::testStrictSearchIterator(SearchContext & threeHits, } { // search for value with no hits - noHits.fetchPostings(true); + noHits.fetchPostings(queryeval::ExecuteInfo::TRUE); SearchBasePtr sb = noHits.createIterator(&dummy, true); sb->initRange(1, noHits.attribute().getCommittedDocIdLimit()); ASSERT_TRUE(typeTester.matches(*sb)); @@ -780,7 +781,7 @@ SearchContextTest::testNonStrictSearchIterator(SearchContext & threeHits, { TermFieldMatchData dummy; { // search for value with three hits - threeHits.fetchPostings(false); + threeHits.fetchPostings(queryeval::ExecuteInfo::FALSE); SearchBasePtr sb = threeHits.createIterator(&dummy, false); sb->initRange(1, threeHits.attribute().getCommittedDocIdLimit()); EXPECT_TRUE(typeTester.matches(*sb)); @@ -798,7 +799,7 @@ SearchContextTest::testNonStrictSearchIterator(SearchContext & threeHits, EXPECT_TRUE(sb->getDocId() == 5u || sb->isAtEnd()); } { // search for value with no hits - noHits.fetchPostings(false); + noHits.fetchPostings(queryeval::ExecuteInfo::FALSE); SearchBasePtr sb = noHits.createIterator(&dummy, false); sb->initRange(1, threeHits.attribute().getCommittedDocIdLimit()); |