aboutsummaryrefslogtreecommitdiff
path: root/lib/open.cc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2022-08-14 12:02:59 -0300
committerDavid Bremner <david@tethera.net>2022-09-03 08:43:33 -0300
commit2e5ef69fbf9ce9d67720d5d4abba3026302734e5 (patch)
treeb122d17950f5d228c4616ed819ddeab633867591 /lib/open.cc
parent93c602a82fdbd03e0104ea922d073b2b1aa6b241 (diff)
lib: add field processor for lastmod: prefix
By sharing the existing logic used by the sexp query parser, this allows negative lastmod revisions to be interpreted as relative to the most recent revision.
Diffstat (limited to 'lib/open.cc')
-rw-r--r--lib/open.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/open.cc b/lib/open.cc
index caa58ff6..67ff868c 100644
--- a/lib/open.cc
+++ b/lib/open.cc
@@ -3,6 +3,7 @@
#include "database-private.h"
#include "parse-time-vrp.h"
+#include "lastmod-fp.h"
#include "path-util.h"
#if HAVE_XAPIAN_DB_RETRY_LOCK
@@ -489,8 +490,7 @@ _finish_open (notmuch_database_t *notmuch,
notmuch->value_range_processor = new Xapian::NumberRangeProcessor (NOTMUCH_VALUE_TIMESTAMP);
notmuch->date_range_processor = new ParseTimeRangeProcessor (NOTMUCH_VALUE_TIMESTAMP,
"date:");
- notmuch->last_mod_range_processor = new Xapian::NumberRangeProcessor (NOTMUCH_VALUE_LAST_MOD,
- "lastmod:");
+ notmuch->last_mod_range_processor = new LastModRangeProcessor (notmuch, "lastmod:");
notmuch->query_parser->set_default_op (Xapian::Query::OP_AND);
notmuch->query_parser->set_database (*notmuch->xapian_db);
notmuch->stemmer = new Xapian::Stem ("english");