summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2022-09-12 08:26:02 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2022-09-12 08:27:19 +0000
commit58fbe6f2e0d30ba239036987134a246828246542 (patch)
treea20efd64ec8d27bf6c54f61c99cab0cebfed67f9 /searchcore
parent0d13b7f7c153a36f785978463f19d58157360639 (diff)
GlobalFilter is now an interface
instead of a shared optional BitVector
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/matching/query_test.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/searchcore/src/tests/proton/matching/query_test.cpp b/searchcore/src/tests/proton/matching/query_test.cpp
index eacb4108686..78bb679a7dc 100644
--- a/searchcore/src/tests/proton/matching/query_test.cpp
+++ b/searchcore/src/tests/proton/matching/query_test.cpp
@@ -1158,21 +1158,20 @@ Test::global_filter_is_calculated_and_handled()
auto res = Query::handle_global_filter(bp, docid_limit, 0, 0.3, nullptr);
EXPECT_TRUE(res);
EXPECT_TRUE(bp.filter);
- EXPECT_TRUE(bp.filter->has_filter());
+ EXPECT_TRUE(bp.filter->is_active());
EXPECT_EQUAL(0.3, bp.estimated_hit_ratio);
- auto* bv = bp.filter->filter();
- EXPECT_EQUAL(3u, bv->countTrueBits());
- EXPECT_TRUE(bv->testBit(3));
- EXPECT_TRUE(bv->testBit(5));
- EXPECT_TRUE(bv->testBit(7));
+ EXPECT_EQUAL(3u, bp.filter->count());
+ EXPECT_TRUE(bp.filter->check(3));
+ EXPECT_TRUE(bp.filter->check(5));
+ EXPECT_TRUE(bp.filter->check(7));
}
{ // estimated_hit_ratio > global_filter_upper_limit
GlobalFilterBlueprint bp(result, true);
auto res = Query::handle_global_filter(bp, docid_limit, 0, 0.29, nullptr);
EXPECT_TRUE(res);
EXPECT_TRUE(bp.filter);
- EXPECT_FALSE(bp.filter->has_filter());
+ EXPECT_FALSE(bp.filter->is_active());
EXPECT_EQUAL(0.3, bp.estimated_hit_ratio);
}
}