diff options
| author | David Bremner <david@tethera.net> | 2017-02-15 08:58:28 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-05-09 07:44:15 -0300 |
| commit | eab365c742f86b52729ec2a5acaba1a798f94661 (patch) | |
| tree | 4b01c9b852d8c27fef20a92728496f3b132c0954 /lib/database.cc | |
| parent | 77c9ec1fddcbe145facfc3d65eee55b11ad61fb9 (diff) | |
lib: Add regexp searching for mid: prefix
The bulk of the change is passing in the field options to the regexp
field processor, so that we can properly handle the
fallback (non-regexp case).
Diffstat (limited to 'lib/database.cc')
| -rw-r--r-- | lib/database.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/database.cc b/lib/database.cc index 5bc131a3..49b3849c 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -262,7 +262,8 @@ prefix_t prefix_table[] = { { "tag", "K", NOTMUCH_FIELD_EXTERNAL }, { "is", "K", NOTMUCH_FIELD_EXTERNAL }, { "id", "Q", NOTMUCH_FIELD_EXTERNAL }, - { "mid", "Q", NOTMUCH_FIELD_EXTERNAL }, + { "mid", "Q", NOTMUCH_FIELD_EXTERNAL | + NOTMUCH_FIELD_PROCESSOR }, { "path", "P", NOTMUCH_FIELD_EXTERNAL }, { "property", "XPROPERTY", NOTMUCH_FIELD_EXTERNAL }, /* @@ -313,7 +314,8 @@ _setup_query_field (const prefix_t *prefix, notmuch_database_t *notmuch) else if (STRNCMP_LITERAL(prefix->name, "query") == 0) fp = (new QueryFieldProcessor (*notmuch->query_parser, notmuch))->release (); else - fp = (new RegexpFieldProcessor (prefix->name, *notmuch->query_parser, notmuch))->release (); + fp = (new RegexpFieldProcessor (prefix->name, prefix->flags, + *notmuch->query_parser, notmuch))->release (); /* we treat all field-processor fields as boolean in order to get the raw input */ notmuch->query_parser->add_boolean_prefix (prefix->name, fp); |
