diff options
| author | David Bremner <david@tethera.net> | 2016-03-22 07:54:54 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-05-25 07:40:44 -0300 |
| commit | b9bf3f44eacd42ce53885c79f9dad8d82c76f13d (patch) | |
| tree | dbf4064112caa61dcf8fd6b22d27fad0e1ad81e2 /lib/database.cc | |
| parent | 30caaf52b022be5f0f695f3088286fb56e82c782 (diff) | |
lib: add support for named queries
This relies on the optional presense of xapian field processors, and the
library config API.
Diffstat (limited to 'lib/database.cc')
| -rw-r--r-- | lib/database.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/database.cc b/lib/database.cc index ebe019fb..96300008 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -20,6 +20,7 @@ #include "database-private.h" #include "parse-time-vrp.h" +#include "query-fp.h" #include "string-util.h" #include <iostream> @@ -1005,6 +1006,8 @@ notmuch_database_open_verbose (const char *path, * with a .. to the range processor */ notmuch->date_field_processor = new DateFieldProcessor(); notmuch->query_parser->add_boolean_prefix("date", notmuch->date_field_processor); + notmuch->query_field_processor = new QueryFieldProcessor (*notmuch->query_parser, notmuch); + notmuch->query_parser->add_boolean_prefix("query", notmuch->query_field_processor); #endif notmuch->last_mod_range_processor = new Xapian::NumberValueRangeProcessor (NOTMUCH_VALUE_LAST_MOD, "lastmod:"); |
