Skip to content

Commit

Permalink
Merge pull request #33297 from vespa-engine/arnej/handle-inactive-glo…
Browse files Browse the repository at this point in the history
…bal-filter

handle a real global filter matching all documents
  • Loading branch information
arnej27959 authored Feb 11, 2025
2 parents d583e45 + 28f2986 commit c0a9514
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions searchcore/src/vespa/searchcore/proton/matching/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,11 @@ Query::handle_global_filter(Blueprint& blueprint, uint32_t docid_limit,
estimated_hit_ratio, global_filter_upper_limit));
}
global_filter = GlobalFilter::create(blueprint, docid_limit, thread_bundle, trace);
if (!global_filter->is_active() && trace && trace->shouldTrace(5)) {
trace->addEvent(5, "Global filter matches everything");
if (!global_filter->is_active()) {
estimated_hit_ratio = 1.0;
if (trace && trace->shouldTrace(5)) {
trace->addEvent(5, "Global filter matches everything");
}
}
} else {
if (trace && trace->shouldTrace(5)) {
Expand Down

0 comments on commit c0a9514

Please sign in to comment.