diff options
Diffstat (limited to 'searchlib/src/tests/attribute/searchable')
3 files changed, 17 insertions, 14 deletions
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 3b346601245..bc360e635c1 100644 --- a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp +++ b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp @@ -223,8 +223,9 @@ 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::createForTest(strict)); - SearchIterator::UP iterator = bp->createSearch(*match_data, strict); + bp->basic_plan(strict, 100); + bp->fetchPostings(queryeval::ExecuteInfo::FULL); + SearchIterator::UP iterator = bp->createSearch(*match_data); ASSERT_TRUE(iterator); iterator->initRange(1, num_docs); extract_posting_info(result, iterator->getPostingInfo()); diff --git a/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp b/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp index a8630ea569e..7a794795cce 100644 --- a/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp +++ b/searchlib/src/tests/attribute/searchable/attribute_weighted_set_blueprint_test.cpp @@ -111,8 +111,9 @@ struct WS { FieldSpecList fields; fields.add(FieldSpec(field, fieldId, handle, ac.getAttribute(field)->getIsFilter())); queryeval::Blueprint::UP bp = searchable.createBlueprint(requestContext, fields, *node); - bp->fetchPostings(queryeval::ExecuteInfo::createForTest(strict)); - SearchIterator::UP sb = bp->createSearch(*md, strict); + bp->basic_plan(strict, 100); + bp->fetchPostings(queryeval::ExecuteInfo::FULL); + SearchIterator::UP sb = bp->createSearch(*md); return sb; } bool isWeightedSetTermSearch(Searchable &searchable, const std::string &field, bool strict) const { @@ -127,8 +128,9 @@ struct WS { FieldSpecList fields; fields.add(FieldSpec(field, fieldId, handle)); queryeval::Blueprint::UP bp = searchable.createBlueprint(requestContext, fields, *node); - bp->fetchPostings(queryeval::ExecuteInfo::createForTest(strict)); - SearchIterator::UP sb = bp->createSearch(*md, strict); + bp->basic_plan(strict, 100); + bp->fetchPostings(queryeval::ExecuteInfo::FULL); + SearchIterator::UP sb = bp->createSearch(*md); FakeResult result; sb->initRange(1, 10); for (uint32_t docId = 1; docId < 10; ++docId) { diff --git a/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp b/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp index 50f7d170afc..4a7cc3984dd 100644 --- a/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp +++ b/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp @@ -127,9 +127,9 @@ do_search(const Node &node, IAttributeManager &attribute_manager, bool expect_at } else { EXPECT_TRUE(result->get_attribute_search_context() == nullptr); } - result->fetchPostings(queryeval::ExecuteInfo::TRUE); - result->setDocIdLimit(DOCID_LIMIT); - SearchIterator::UP iterator = result->createSearch(*md, true); + result->basic_plan(true, DOCID_LIMIT); + result->fetchPostings(queryeval::ExecuteInfo::FULL); + SearchIterator::UP iterator = result->createSearch(*md); assert((bool)iterator); iterator->initRange(1, DOCID_LIMIT); EXPECT_TRUE(!iterator->seek(1)); @@ -313,8 +313,8 @@ public: ~BlueprintFactoryFixture() {} Blueprint::UP create_blueprint(const Node& term) { auto result = source.createBlueprint(request_ctx, FieldSpec(attr_name, 0, 0), term); - result->fetchPostings(queryeval::ExecuteInfo::TRUE); - result->setDocIdLimit(DOCID_LIMIT); + result->basic_plan(true, DOCID_LIMIT); + result->fetchPostings(queryeval::ExecuteInfo::FULL); return result; } void expect_document_weight_attribute() { @@ -325,14 +325,14 @@ public: } void expect_filter_search(const SimpleResult& upper, const SimpleResult& lower, const Node& term) { auto blueprint = create_blueprint(term); - auto upper_itr = blueprint->createFilterSearch(true, BFC::UPPER_BOUND); - auto lower_itr = blueprint->createFilterSearch(true, BFC::LOWER_BOUND); + auto upper_itr = blueprint->createFilterSearch(BFC::UPPER_BOUND); + auto lower_itr = blueprint->createFilterSearch(BFC::LOWER_BOUND); EXPECT_EQ(upper, SimpleResult().search(*upper_itr, DOCID_LIMIT)); EXPECT_EQ(lower, SimpleResult().search(*lower_itr, DOCID_LIMIT)); } void expect_filter_wrapper(const Node& term) { auto blueprint = create_blueprint(term); - auto itr = blueprint->createFilterSearch(true, BFC::UPPER_BOUND); + auto itr = blueprint->createFilterSearch(BFC::UPPER_BOUND); downcast<FilterWrapper>(*itr); } }; |