diff options
author | Geir Storli <geirst@yahooinc.com> | 2022-11-01 12:25:18 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahooinc.com> | 2022-11-01 12:25:18 +0000 |
commit | ff2fc83f77d03709f2fb01a4545d25dbe6a88eb9 (patch) | |
tree | 042e225bf960062e8788f71a66ae5ab06c7fd216 /searchcore | |
parent | 1364c6425a9dc353fa74fa686da2dc6d9b2a9c8d (diff) |
Add a trace if the global filter matches everything.
This case enables an optimization to search the HNSW index without using the filter at all.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/query.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.cpp b/searchcore/src/vespa/searchcore/proton/matching/query.cpp index a5fbb588ea1..9217b985ba5 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/query.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/query.cpp @@ -293,9 +293,12 @@ 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); + if (!global_filter->is_active() && trace && trace->shouldTrace(5)) { + trace->addEvent(5, "Global filter matches everything"); + } } else { if (trace && trace->shouldTrace(5)) { - trace->addEvent(5, vespalib::make_string("Create match all global filter (estimated_hit_ratio (%f) > upper_limit (%f))", + trace->addEvent(5, vespalib::make_string("Create match everything global filter (estimated_hit_ratio (%f) > upper_limit (%f))", estimated_hit_ratio, global_filter_upper_limit)); } global_filter = GlobalFilter::create(); |