summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/matching
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-09-12 13:21:52 +0200
committerGitHub <noreply@github.com>2022-09-12 13:21:52 +0200
commit33c97cd5a14070178a1499fb7c3abe2e00e663fa (patch)
treec9184d8fa429b53afe09119406595aab2ed067fb /searchcore/src/tests/proton/matching
parent2823e2353618573aa0513309e07cbd3c62d519f1 (diff)
parent58fbe6f2e0d30ba239036987134a246828246542 (diff)
Merge pull request #24011 from vespa-engine/havardpe/global-filter-as-interface
GlobalFilter is now an interface
Diffstat (limited to 'searchcore/src/tests/proton/matching')
-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);
}
}