summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2023-12-01 14:44:38 +0100
committerGitHub <noreply@github.com>2023-12-01 14:44:38 +0100
commit0f23c3c76ac830951656cc3f1bea255d0cf0f5cb (patch)
tree9d8f010f35ab78bb727f7e8b4591f48df521d223
parentd974fd50cb11f76945cba2f88a4a4fe77feb4a05 (diff)
parente51f73cb49d15a4b5b64491ce9c7e213f65a087a (diff)
Merge pull request #29527 from vespa-engine/toregge/wire-in-indexed-fields-for-in-operator
Wire in indexed fields for in operator.
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp18
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.h3
2 files changed, 17 insertions, 4 deletions
diff --git a/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp b/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp
index 7e4ec966dda..27ff0d235a3 100644
--- a/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.cpp
@@ -87,21 +87,33 @@ CreateBlueprintVisitorHelper::createWeightedSet(std::unique_ptr<WS> bp, NODE &n)
bp->complete(estimate);
setResult(std::move(bp));
}
+
void
-CreateBlueprintVisitorHelper::visitWeightedSetTerm(query::WeightedSetTerm &n) {
+CreateBlueprintVisitorHelper::visitWeightedSetTerm(query::WeightedSetTerm &n)
+{
createWeightedSet(std::make_unique<WeightedSetTermBlueprint>(_field), n);
}
+
void
-CreateBlueprintVisitorHelper::visitDotProduct(query::DotProduct &n) {
+CreateBlueprintVisitorHelper::visitDotProduct(query::DotProduct &n)
+{
createWeightedSet(std::make_unique<DotProductBlueprint>(_field), n);
}
+
void
-CreateBlueprintVisitorHelper::visitWandTerm(query::WandTerm &n) {
+CreateBlueprintVisitorHelper::visitWandTerm(query::WandTerm &n)
+{
createWeightedSet(std::make_unique<ParallelWeakAndBlueprint>(_field, n.getTargetNumHits(),
n.getScoreThreshold(), n.getThresholdBoostFactor()),
n);
}
+void
+CreateBlueprintVisitorHelper::visitInTerm(query::InTerm &n)
+{
+ createWeightedSet(std::make_unique<WeightedSetTermBlueprint>(_field), n);
+}
+
void CreateBlueprintVisitorHelper::visit(query::TrueQueryNode &) {
setResult(std::make_unique<AlwaysTrueBlueprint>());
}
diff --git a/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.h b/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.h
index 26d6f1d384d..98f62fa3249 100644
--- a/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.h
+++ b/searchlib/src/vespa/searchlib/queryeval/create_blueprint_visitor_helper.h
@@ -48,6 +48,7 @@ public:
void visitDotProduct(query::DotProduct &n);
void visitWandTerm(query::WandTerm &n);
void visitNearestNeighborTerm(query::NearestNeighborTerm &n);
+ void visitInTerm(query::InTerm &n);
void handleNumberTermAsText(query::NumberTerm &n);
@@ -69,7 +70,7 @@ public:
void visit(query::WeightedSetTerm &n) override { visitWeightedSetTerm(n); }
void visit(query::DotProduct &n) override { visitDotProduct(n); }
void visit(query::WandTerm &n) override { visitWandTerm(n); }
- void visit(query::InTerm&) override { illegalVisit(); }
+ void visit(query::InTerm& n) override { visitInTerm(n); }
void visit(query::NumberTerm &n) override = 0;
void visit(query::LocationTerm &n) override = 0;