summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2023-12-01 14:00:56 +0100
committerTor Egge <Tor.Egge@online.no>2023-12-01 14:00:56 +0100
commite51f73cb49d15a4b5b64491ce9c7e213f65a087a (patch)
tree2800e17238640eb59334b6b8289008ccf3e1889d
parente8374248c04c075eae22e95aeb507e27c06b3a43 (diff)
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;