aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src
diff options
context:
space:
mode:
authorGeir Storli <geirst@vespa.ai>2024-06-04 09:08:59 +0200
committerGitHub <noreply@github.com>2024-06-04 09:08:59 +0200
commit091dcfbeabdabf4f9d3ef673fdd4326ea509b8e9 (patch)
tree7a0d943bf7ba1061a9da967e63b80543ae1474e3 /searchcore/src
parent4312034f318b39df57776aff65ac6d3cebc263ad (diff)
parentb12b6009688146a498a4a71593bef57a0daa070a (diff)
Merge pull request #31410 from vespa-engine/havardpe/enumeration-of-blueprint-nodes
Havardpe/enumeration of blueprint nodes
Diffstat (limited to 'searchcore/src')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.h2
3 files changed, 11 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
index 66648dda8c6..73a812f936f 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
@@ -206,6 +206,9 @@ MatchToolsFactory(QueryLimiter & queryLimiter,
_query.extractLocations(_queryEnv.locations());
trace.addEvent(5, "Build query execution plan");
_query.reserveHandles(_requestContext, searchContext, _mdl);
+ if (trace.getLevel() >= 6) { // will dump blueprint later
+ _query.enumerate_blueprint_nodes();
+ }
trace.addEvent(5, "Optimize query execution plan");
bool sort_by_cost = SortBlueprintsByCost::check(_queryEnv.getProperties(), rankSetup.sort_blueprints_by_cost());
double hitRate = std::min(1.0, double(maxNumHits)/double(searchContext.getDocIdLimit()));
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.cpp b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
index 70f60ff1c2d..b31451059be 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
@@ -198,6 +198,12 @@ Query::reserveHandles(const IRequestContext & requestContext, ISearchContext &co
}
void
+Query::enumerate_blueprint_nodes() noexcept
+{
+ _blueprint->enumerate(1);
+}
+
+void
Query::optimize(InFlow in_flow, bool sort_by_cost)
{
_in_flow = in_flow;
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.h b/searchcore/src/vespa/searchcore/proton/matching/query.h
index 03aea5a0d2d..8d6f84763a3 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.h
@@ -97,6 +97,8 @@ public:
ISearchContext &context,
search::fef::MatchDataLayout &mdl);
+ void enumerate_blueprint_nodes() noexcept;
+
/**
* Optimize the query to be executed. This function should be
* called after the reserveHandles function and before the