diff options
author | Arne Juul <arnej@verizonmedia.com> | 2020-06-08 11:28:25 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2020-06-08 11:36:34 +0000 |
commit | ffe564fef3def35b34cc3e4bd661bb68b45469b6 (patch) | |
tree | 781a41d0bacb657b1700d4c33ed61d1843bb06f1 /searchlib | |
parent | 54a23d2bc9a05eb7d503d5be5cbe5e757eea571e (diff) |
no fallback to brute force for now
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp | 4 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp index ac14233f32d..74e67fb7fcd 100644 --- a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp +++ b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp @@ -847,8 +847,8 @@ TEST_F("NN blueprint handles strong filter", NearestNeighborBlueprintFixture) filter->invalidateCachedCount(); auto strong_filter = GlobalFilter::create(std::move(filter)); bp->set_global_filter(*strong_filter); - EXPECT_EQUAL(11u, bp->getState().estimate().estHits); - EXPECT_FALSE(bp->may_approximate()); + EXPECT_EQUAL(1u, bp->getState().estimate().estHits); + EXPECT_TRUE(bp->may_approximate()); } TEST_F("NN blueprint handles weak filter", NearestNeighborBlueprintFixture) diff --git a/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp index 5e46d24a98d..55342f91e93 100644 --- a/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp +++ b/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp @@ -97,9 +97,7 @@ NearestNeighborBlueprint::set_global_filter(const GlobalFilter &global_filter) uint32_t max_hits = _global_filter->filter()->countTrueBits(); LOG(debug, "set_global_filter getNumDocs: %u / max_hits %u", est_hits, max_hits); if (max_hits * 10 < est_hits) { - // too many hits filtered out, use brute force implementation: - _approximate = false; - return; + LOG(debug, "too many hits filtered out, consider using brute force implementation"); } est_hits = std::min(est_hits, max_hits); } |