diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-11-07 20:13:14 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-11-07 20:13:14 +0000 |
commit | 11bd48b6a5dbb10f7d25d2f225870fd3ccbd1d0d (patch) | |
tree | 46651646687791fc3f11dd54c80be3fe32a608d3 | |
parent | 092a7ed71ffbe6450f7f2c09a87c466432224091 (diff) |
Clearly separate convenience methods only used for testing.
4 files changed, 7 insertions, 7 deletions
diff --git a/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp b/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp index 17a393d97eb..79bdd83dc88 100644 --- a/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp +++ b/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp @@ -272,7 +272,7 @@ TEST_F("Strict iterator is marked as strict", Fixture) { TEST_F("Non-strict blueprint with high hit rate is strict", Fixture(false, FastSearchConfig::ExplicitlyEnabled)) { auto ctx = f.create_context(word_term("5678")); - ctx->fetchPostings(queryeval::ExecuteInfo::create(false, 0.02)); + ctx->fetchPostings(queryeval::ExecuteInfo::createForTest(false, 0.02)); TermFieldMatchData match; auto iter = f.create_iterator(*ctx, match, false); @@ -281,7 +281,7 @@ TEST_F("Non-strict blueprint with high hit rate is strict", Fixture(false, FastS TEST_F("Non-strict blueprint with low hit rate is non-strict", Fixture(false, FastSearchConfig::ExplicitlyEnabled)) { auto ctx = f.create_context(word_term("5678")); - ctx->fetchPostings(queryeval::ExecuteInfo::create(false, 0.01)); + ctx->fetchPostings(queryeval::ExecuteInfo::createForTest(false, 0.01)); TermFieldMatchData match; auto iter = f.create_iterator(*ctx, match, false); diff --git a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp index 03e338ee284..029c3130609 100644 --- a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp +++ b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp @@ -220,7 +220,7 @@ Result do_search(IAttributeManager &attribute_manager, const Node &node, bool st Blueprint::UP bp = source.createBlueprint(requestContext, FieldSpec(field, fieldId, handle), node); ASSERT_TRUE(bp); Result result(bp->getState().estimate().estHits, bp->getState().estimate().empty); - bp->fetchPostings(queryeval::ExecuteInfo::create(strict, 1.0)); + bp->fetchPostings(queryeval::ExecuteInfo::createForTest(strict)); SearchIterator::UP iterator = bp->createSearch(*match_data, strict); ASSERT_TRUE(iterator); iterator->initRange(1, num_docs); diff --git a/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp b/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp index 91b6efc26a6..343a5c8e38b 100644 --- a/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp +++ b/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp @@ -216,7 +216,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(queryeval::ExecuteInfo::create(strict, 1.0)); + sc.fetchPostings(queryeval::ExecuteInfo::createForTest(strict)); for (bool withElementId : {false, true}) { testSearchIteratorUnpacking(ptr, sc, extra, strict, withElementId); } @@ -649,7 +649,7 @@ public: ~Verifier() override; SearchIterator::UP create(bool strict) const override { - _sc->fetchPostings(queryeval::ExecuteInfo::create(strict, 1.0)); + _sc->fetchPostings(queryeval::ExecuteInfo::createForTest(strict)); return _sc->createIterator(&_dummy, strict); } private: diff --git a/searchlib/src/vespa/searchlib/queryeval/executeinfo.h b/searchlib/src/vespa/searchlib/queryeval/executeinfo.h index adc9cf757d4..362b0826f67 100644 --- a/searchlib/src/vespa/searchlib/queryeval/executeinfo.h +++ b/searchlib/src/vespa/searchlib/queryeval/executeinfo.h @@ -26,9 +26,9 @@ public: return {strict, hitRate, doom}; } static ExecuteInfo createForTest(bool strict) noexcept { - return create(strict, 1.0F); + return createForTest(strict, 1.0F); } - static ExecuteInfo create(bool strict, float hitRate) noexcept { + static ExecuteInfo createForTest(bool strict, float hitRate) noexcept { return create(strict, hitRate, nullptr); } private: |