diff options
author | Arne H Juul <arnej@yahooinc.com> | 2022-01-28 12:06:19 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2022-01-28 12:06:19 +0000 |
commit | 5d45925095457bd71b3b4416ff4942fcddd77780 (patch) | |
tree | f82d40a8e0302d3d7f7bae4975cd1147d6626c02 /searchlib/src | |
parent | 685dc8c55f3720a3dd364abcb452eb48d5a2f254 (diff) |
convert ITEM_GEO_LOCATION_TERM to something useful
Diffstat (limited to 'searchlib/src')
-rw-r--r-- | searchlib/src/vespa/searchlib/query/query_term_simple.h | 4 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/query/streaming/querynode.cpp | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/searchlib/src/vespa/searchlib/query/query_term_simple.h b/searchlib/src/vespa/searchlib/query/query_term_simple.h index cfdba03855c..433ab7d56dd 100644 --- a/searchlib/src/vespa/searchlib/query/query_term_simple.h +++ b/searchlib/src/vespa/searchlib/query/query_term_simple.h @@ -21,7 +21,8 @@ public: SUBSTRINGTERM = 2, EXACTSTRINGTERM = 3, SUFFIXTERM = 4, - REGEXP = 5 + REGEXP = 5, + GEO_LOCATION = 6 }; template <typename N> @@ -59,6 +60,7 @@ public: bool isSuffix() const { return (_type == Type::SUFFIXTERM); } bool isWord() const { return (_type == Type::WORD); } bool isRegex() const { return (_type == Type::REGEXP); } + bool isGeoLoc() const { return (_type == Type::GEO_LOCATION); } bool empty() const { return _term.empty(); } virtual void visitMembers(vespalib::ObjectVisitor &visitor) const; vespalib::string getClassName() const; diff --git a/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp b/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp index 060573861d9..77fc97913a4 100644 --- a/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp +++ b/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp @@ -71,11 +71,12 @@ QueryNode::Build(const QueryNode * parent, const QueryNodeResultFactory & factor qn = std::make_unique<FalseNode>(); break; case ParseItem::ITEM_GEO_LOCATION_TERM: - // TODO implement this: - // vespalib::string field = queryRep.getIndexName(); - // vespalib::stringref location_term = queryRep.getTerm(); - // qn = std::make_unique<LocationQueryNode> ...something .... - // break; + // just keep the string representation here; parsed in vsm::GeoPosFieldSearcher + qn = std::make_unique<QueryTerm>(factory.create(), + queryRep.getTerm(), + queryRep.getIndexName(), + QueryTerm::Type::GEO_LOCATION); + break; case ParseItem::ITEM_NUMTERM: case ParseItem::ITEM_TERM: case ParseItem::ITEM_PREFIXTERM: |