aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-09-15 14:43:16 +0200
committerGitHub <noreply@github.com>2022-09-15 14:43:16 +0200
commit2b75660d7994a2cf45c39b849c0bca15f70245a3 (patch)
tree9c2c12a152735563b8e70cbdb34fcb63a958df67 /searchcore
parentbe1e41ffc5cf287d0ba2f66bc6115363252c3623 (diff)
parent8ed8658a8073da8e1be630907995df24c28ab7a5 (diff)
Merge pull request #24072 from vespa-engine/havardpe/multi-threaded-create-global-filter
multi-threaded global filter creation
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.cpp13
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.h4
2 files changed, 1 insertions, 16 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.cpp b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
index d8951eb1084..599a7989bb9 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
@@ -261,17 +261,6 @@ Query::handle_global_filter(uint32_t docid_limit, double global_filter_lower_lim
fetchPostings();
}
-std::shared_ptr<GlobalFilter>
-Query::create_global_filter(Blueprint& blueprint, uint32_t docid_limit, vespalib::ThreadBundle &thread_bundle)
-{
- (void) thread_bundle; // multi-threaded filter generation coming soon
- bool strict = true;
- auto constraint = Blueprint::FilterConstraint::UPPER_BOUND;
- auto filter_iterator = blueprint.createFilterSearch(strict, constraint);
- filter_iterator->initRange(1, docid_limit);
- return GlobalFilter::create(filter_iterator->get_hits(1));
-}
-
bool
Query::handle_global_filter(Blueprint& blueprint, uint32_t docid_limit,
double global_filter_lower_limit, double global_filter_upper_limit,
@@ -297,7 +286,7 @@ Query::handle_global_filter(Blueprint& blueprint, uint32_t docid_limit,
trace->addEvent(5, vespalib::make_string("Calculate global filter (estimated_hit_ratio (%f) <= upper_limit (%f))",
estimated_hit_ratio, global_filter_upper_limit));
}
- global_filter = create_global_filter(blueprint, docid_limit, thread_bundle);
+ global_filter = GlobalFilter::create(blueprint, docid_limit, thread_bundle);
} else {
if (trace && trace->shouldTrace(5)) {
trace->addEvent(5, vespalib::make_string("Create match all global filter (estimated_hit_ratio (%f) > upper_limit (%f))",
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.h b/searchcore/src/vespa/searchcore/proton/matching/query.h
index 1f9499b02d8..596f8019fb3 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.h
@@ -98,10 +98,6 @@ public:
void handle_global_filter(uint32_t docid_limit, double global_filter_lower_limit, double global_filter_upper_limit,
vespalib::ThreadBundle &thread_bundle, search::engine::Trace& trace);
-
- // Create a global filter. Called by handle_global_filter if needed.
- static std::shared_ptr<GlobalFilter> create_global_filter(Blueprint& blueprint, uint32_t docid_limit,
- vespalib::ThreadBundle &thread_bundle);
/**
* Calculates and handles the global filter if needed by the blueprint tree.