aboutsummaryrefslogtreecommitdiff
path: root/lib/regexp-fields.h
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-08-24 08:17:28 -0700
committerDavid Bremner <david@tethera.net>2021-09-04 17:07:19 -0700
commit5cb452c325e1f69e43dca610f48b9396cba9c039 (patch)
treef2c1ec908ab3eaca74cfd10df84fd692616764d9 /lib/regexp-fields.h
parent0b98ad5e4ef6b0345f28143243de1170c5c3df54 (diff)
lib: factor out query construction from regexp
This will allow re-use of this code outside of the Xapian query parser.
Diffstat (limited to 'lib/regexp-fields.h')
-rw-r--r--lib/regexp-fields.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/regexp-fields.h b/lib/regexp-fields.h
index a8cca243..9c871de7 100644
--- a/lib/regexp-fields.h
+++ b/lib/regexp-fields.h
@@ -30,6 +30,11 @@
#include "database-private.h"
#include "notmuch-private.h"
+notmuch_status_t
+_notmuch_regex_to_query (notmuch_database_t *notmuch, Xapian::valueno slot, std::string field,
+ std::string regexp_str,
+ Xapian::Query &output, std::string &msg);
+
/* A posting source that returns documents where a value matches a
* regexp.
*/
@@ -64,6 +69,7 @@ public:
class RegexpFieldProcessor : public Xapian::FieldProcessor {
protected:
Xapian::valueno slot;
+ std::string field;
std::string term_prefix;
notmuch_field_flag_t options;
Xapian::QueryParser &parser;