aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2024-03-14 12:40:34 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2024-03-20 12:59:59 +0000
commit97da6db442eb0385571f834c75a8d65bd239c620 (patch)
treeb78347b8987ad09d7340b42ffdbe445438daf020 /searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp
parent7938460dd3b3d72ec1900febe29c1a94db964648 (diff)
tag blueprints with strictness
The strict-aware sort function is responsible for propagating and tagging strictness throughout the blueprint tree. Use pre-tagged strictness in fetchPostings, createSearch and createFilterSearch.
Diffstat (limited to 'searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp')
-rw-r--r--searchlib/src/tests/attribute/imported_search_context/imported_search_context_test.cpp22
1 files changed, 11 insertions, 11 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 93ae9cb13cb..41ec377dece 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
@@ -271,7 +271,7 @@ TEST_F("Non-strict iterator unpacks target match data for weighted set hit", Wse
TEST_F("Strict iterator is marked as strict", Fixture) {
auto ctx = f.create_context(word_term("5678"));
- ctx->fetchPostings(queryeval::ExecuteInfo::TRUE);
+ ctx->fetchPostings(queryeval::ExecuteInfo::FULL, true);
TermFieldMatchData match;
auto iter = f.create_strict_iterator(*ctx, match);
@@ -280,7 +280,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::createForTest(false, 0.02));
+ ctx->fetchPostings(queryeval::ExecuteInfo::createForTest(0.02), false);
TermFieldMatchData match;
auto iter = f.create_iterator(*ctx, match, false);
@@ -289,7 +289,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::createForTest(false, 0.01));
+ ctx->fetchPostings(queryeval::ExecuteInfo::createForTest(0.01), false);
TermFieldMatchData match;
auto iter = f.create_iterator(*ctx, match, false);
@@ -314,7 +314,7 @@ SingleValueFixture::~SingleValueFixture() = default;
TEST_F("Strict iterator seeks to first available hit LID", SingleValueFixture) {
auto ctx = f.create_context(word_term("5678"));
- ctx->fetchPostings(queryeval::ExecuteInfo::TRUE);
+ ctx->fetchPostings(queryeval::ExecuteInfo::FULL, true);
TermFieldMatchData match;
auto iter = f.create_strict_iterator(*ctx, match);
@@ -340,7 +340,7 @@ TEST_F("Strict iterator seeks to first available hit LID", SingleValueFixture) {
TEST_F("Strict iterator unpacks target match data for single value hit", SingleValueFixture) {
auto ctx = f.create_context(word_term("5678"));
- ctx->fetchPostings(queryeval::ExecuteInfo::TRUE);
+ ctx->fetchPostings(queryeval::ExecuteInfo::FULL, true);
TermFieldMatchData match;
auto iter = f.create_strict_iterator(*ctx, match);
@@ -352,7 +352,7 @@ TEST_F("Strict iterator unpacks target match data for single value hit", SingleV
TEST_F("Strict iterator unpacks target match data for array hit", ArrayValueFixture) {
auto ctx = f.create_context(word_term("1234"));
- ctx->fetchPostings(queryeval::ExecuteInfo::TRUE);
+ ctx->fetchPostings(queryeval::ExecuteInfo::FULL, true);
TermFieldMatchData match;
auto iter = f.create_strict_iterator(*ctx, match);
@@ -364,7 +364,7 @@ TEST_F("Strict iterator unpacks target match data for array hit", ArrayValueFixt
TEST_F("Strict iterator unpacks target match data for weighted set hit", WsetValueFixture) {
auto ctx = f.create_context(word_term("foo"));
- ctx->fetchPostings(queryeval::ExecuteInfo::TRUE);
+ ctx->fetchPostings(queryeval::ExecuteInfo::FULL, true);
TermFieldMatchData match;
auto iter = f.create_strict_iterator(*ctx, match);
@@ -375,7 +375,7 @@ TEST_F("Strict iterator unpacks target match data for weighted set hit", WsetVal
TEST_F("Strict iterator handles seek outside of LID space", ArrayValueFixture) {
auto ctx = f.create_context(word_term("1234"));
- ctx->fetchPostings(queryeval::ExecuteInfo::TRUE);
+ ctx->fetchPostings(queryeval::ExecuteInfo::FULL, true);
TermFieldMatchData match;
auto iter = f.create_strict_iterator(*ctx, match);
@@ -407,7 +407,7 @@ TEST_F("matches(weight) performs GID mapping and forwards to target attribute",
TEST_F("Multiple iterators can be created from the same context", SingleValueFixture) {
auto ctx = f.create_context(word_term("5678"));
- ctx->fetchPostings(queryeval::ExecuteInfo::TRUE);
+ ctx->fetchPostings(queryeval::ExecuteInfo::FULL, true);
TermFieldMatchData match1;
auto iter1 = f.create_strict_iterator(*ctx, match1);
@@ -490,7 +490,7 @@ TEST_F("Bit vector from search cache is used if found", SearchCacheFixture)
f.imported_attr->getSearchCache()->insert("5678",
makeSearchCacheEntry({2, 6}, f.get_imported_attr()->getNumDocs()));
auto ctx = f.create_context(word_term("5678"));
- ctx->fetchPostings(queryeval::ExecuteInfo::TRUE);
+ ctx->fetchPostings(queryeval::ExecuteInfo::FULL, true);
TermFieldMatchData match;
auto iter = f.create_strict_iterator(*ctx, match);
TEST_DO(f.assertSearch({2, 6}, *iter)); // Note: would be {3, 5} if cache was not used
@@ -509,7 +509,7 @@ TEST_F("Entry is inserted into search cache if bit vector posting list is used",
{
EXPECT_EQUAL(0u, f.imported_attr->getSearchCache()->size());
auto ctx = f.create_context(word_term("5678"));
- ctx->fetchPostings(queryeval::ExecuteInfo::TRUE);
+ ctx->fetchPostings(queryeval::ExecuteInfo::FULL, true);
TermFieldMatchData match;
auto iter = f.create_strict_iterator(*ctx, match);
TEST_DO(f.assertSearch({3, 5}, *iter));