aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2021-10-19 11:08:39 +0000
committerArne H Juul <arnej@yahooinc.com>2021-10-19 11:08:39 +0000
commita7f289541ff64edfeea11d4db4310c5245f1f823 (patch)
tree29c2e575f3f62633e1bdf5ad93290c29211583a0 /searchcore
parent4a93eeb139aeb500057c9527f19b0c47db2f1a5c (diff)
use custom types for true/false (NodeTypes::True, ProtonTrue, etc)
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/matching/unpacking_iterators_optimizer/unpacking_iterators_optimizer_test.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/querynodes.h5
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/same_element_builder.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/termdatafromnode.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/unpacking_iterators_optimizer.cpp4
6 files changed, 14 insertions, 12 deletions
diff --git a/searchcore/src/tests/proton/matching/unpacking_iterators_optimizer/unpacking_iterators_optimizer_test.cpp b/searchcore/src/tests/proton/matching/unpacking_iterators_optimizer/unpacking_iterators_optimizer_test.cpp
index 68960e0f919..ffd08b3bbef 100644
--- a/searchcore/src/tests/proton/matching/unpacking_iterators_optimizer/unpacking_iterators_optimizer_test.cpp
+++ b/searchcore/src/tests/proton/matching/unpacking_iterators_optimizer/unpacking_iterators_optimizer_test.cpp
@@ -67,8 +67,8 @@ struct DumpQuery : QueryVisitor {
void visit(PredicateQuery &) override {}
void visit(RegExpTerm &) override {}
void visit(NearestNeighborTerm &) override {}
- void visit(search::query::TrueQueryNode &) override {}
- void visit(search::query::FalseQueryNode &) override {}
+ void visit(TrueQueryNode &) override {}
+ void visit(FalseQueryNode &) override {}
};
std::string dump_query(Node &root) {
diff --git a/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp b/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp
index a12d556ff5f..9be5920c0ed 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp
@@ -159,11 +159,10 @@ protected:
void visit(ProtonPredicateQuery &n) override { buildTerm(n); }
void visit(ProtonRegExpTerm &n) override { buildTerm(n); }
void visit(ProtonNearestNeighborTerm &n) override { buildTerm(n); }
-
- void visit(search::query::TrueQueryNode &) override {
+ void visit(ProtonTrue &) override {
_result = std::make_unique<AlwaysTrueBlueprint>();
}
- void visit(search::query::FalseQueryNode &) override {
+ void visit(ProtonFalse &) override {
_result = std::make_unique<EmptyBlueprint>();
}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/querynodes.h b/searchcore/src/vespa/searchcore/proton/matching/querynodes.h
index 2ebd52d7fa7..084c533fa55 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/querynodes.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/querynodes.h
@@ -114,7 +114,8 @@ typedef search::query::SimpleOr ProtonOr;
typedef search::query::SimpleRank ProtonRank;
typedef search::query::SimpleWeakAnd ProtonWeakAnd;
typedef search::query::SimpleSameElement ProtonSameElement;
-
+typedef search::query::SimpleTrue ProtonTrue;
+typedef search::query::SimpleFalse ProtonFalse;
struct ProtonEquiv final : public ProtonTermBase<search::query::Equiv> {
search::fef::MatchDataLayout children_mdl;
@@ -161,6 +162,8 @@ struct ProtonNodeTypes {
typedef ProtonPredicateQuery PredicateQuery;
typedef ProtonRegExpTerm RegExpTerm;
typedef ProtonNearestNeighborTerm NearestNeighborTerm;
+ typedef ProtonTrue True;
+ typedef ProtonFalse False;
};
}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.cpp b/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.cpp
index 9e415ed699f..34cb5369c1e 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.cpp
@@ -67,8 +67,8 @@ public:
void visit(ProtonPredicateQuery &) override {}
void visit(ProtonRegExpTerm &n) override { visitTerm(n); }
void visit(ProtonNearestNeighborTerm &) override {}
- void visit(search::query::TrueQueryNode &) override {}
- void visit(search::query::FalseQueryNode &) override {}
+ void visit(ProtonTrue &) override {}
+ void visit(ProtonFalse &) override {}
};
} // namespace proton::matching::<unnamed>
diff --git a/searchcore/src/vespa/searchcore/proton/matching/termdatafromnode.cpp b/searchcore/src/vespa/searchcore/proton/matching/termdatafromnode.cpp
index c752ed76909..c2abeaa36ee 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/termdatafromnode.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/termdatafromnode.cpp
@@ -26,8 +26,8 @@ struct TermDataFromTermVisitor
void visit(ProtonRank &) override {}
void visit(ProtonWeakAnd &) override {}
void visit(ProtonSameElement &) override { }
- void visit(search::query::TrueQueryNode &) override {}
- void visit(search::query::FalseQueryNode &) override {}
+ void visit(ProtonTrue &) override {}
+ void visit(ProtonFalse &) override {}
void visit(ProtonWeightedSetTerm &n) override { visitTerm(n); }
void visit(ProtonDotProduct &n) override { visitTerm(n); }
diff --git a/searchcore/src/vespa/searchcore/proton/matching/unpacking_iterators_optimizer.cpp b/searchcore/src/vespa/searchcore/proton/matching/unpacking_iterators_optimizer.cpp
index bcb482a58ab..d60bc53aa57 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/unpacking_iterators_optimizer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/unpacking_iterators_optimizer.cpp
@@ -57,8 +57,8 @@ struct TermExpander : QueryVisitor {
void visit(PredicateQuery &) override {}
void visit(RegExpTerm &) override {}
void visit(NearestNeighborTerm &) override {}
- void visit(search::query::TrueQueryNode &) override {}
- void visit(search::query::FalseQueryNode &) override {}
+ void visit(TrueQueryNode &) override {}
+ void visit(FalseQueryNode &) override {}
void flush(Intermediate &parent) {
for (Node::UP &term: terms) {