aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@vespa.ai>2024-01-12 12:07:45 +0000
committerTor Brede Vekterli <vekterli@vespa.ai>2024-01-15 16:23:53 +0000
commitae88431f3770388afd22c6856b2ad17c994783ee (patch)
tree934f74c09ac9293269d6e38cac3e9b9359da49b5 /searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp
parent242fee291a7aefab01f8d22e2059d57201d66c10 (diff)
Add regular expression support to streaming search
Introduces an explicit regex query term node (which wraps an RE2 regex instance internally) and extends the existing UTF-8 flexible string searcher to use this query node. Regex matching is optionally case (in)sensitive depending on the normalization mode used. Note on `searcher/searcher_test.cpp`: this adds a magic sentinel `#` char prefix to query term parsing in the test to let a query term be interpreted as a regex rather than exact/prefix/suffix/substring match.
Diffstat (limited to 'searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp')
-rw-r--r--searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp b/searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp
index 3950a179d67..3e05d381ee2 100644
--- a/searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp
+++ b/searchlib/src/vespa/searchlib/query/streaming/queryterm.cpp
@@ -179,4 +179,10 @@ QueryTerm::as_multi_term() noexcept
return nullptr;
}
+RegexpTerm*
+QueryTerm::as_regexp_term() noexcept
+{
+ return nullptr;
+}
+
}