aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-11-07 20:36:59 +0100
committerGitHub <noreply@github.com>2023-11-07 20:36:59 +0100
commit1e8cf6c828048d8ad6d3a0e8c663b9a76db59d19 (patch)
tree9283f2384ec598abae90b5aab674f898b03d698d
parentc22d1b0b77f40352769672aa7c8993e3afbed1c9 (diff)
parente8baf5b19277cd46ff36ea3a8823f598f53954ef (diff)
Merge pull request #29270 from vespa-engine/balder/do-not-offer-post-filters-further-down
Balder/do not offer post filters further down
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/andsearchstrict.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.cpp
index 908843ca3ca..b64d5ba4c05 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.cpp
@@ -92,7 +92,9 @@ do_limit(AttributeLimiter &limiter_factory, SearchIterator::UP search, double ma
uint32_t current_id, uint32_t end_id)
{
SearchIterator::UP limiter = limiter_factory.create_search(wanted_num_docs, max_group_size, match_freq, PRE_FILTER);
- limiter = search->andWith(std::move(limiter), wanted_num_docs);
+ if (PRE_FILTER) {
+ limiter = search->andWith(std::move(limiter), wanted_num_docs);
+ }
if (limiter) {
search = std::make_unique<LimitedSearchT<PRE_FILTER>>(std::move(limiter), std::move(search));
}
diff --git a/searchlib/src/vespa/searchlib/queryeval/andsearchstrict.h b/searchlib/src/vespa/searchlib/queryeval/andsearchstrict.h
index 3205193bc03..54a3464f747 100644
--- a/searchlib/src/vespa/searchlib/queryeval/andsearchstrict.h
+++ b/searchlib/src/vespa/searchlib/queryeval/andsearchstrict.h
@@ -96,6 +96,7 @@ AndSearchStrict<Unpack>::andWith(SearchIterator::UP filter, uint32_t estimate_)
} else {
filter = this->offerFilterToChildren(std::move(filter), estimate_);
if (filter) {
+ // TODO This sounds wrong... Must reconsider. If not strict it should probably be last.
this->insert(1, std::move(filter));
}
}