notmuch/lib
Jani Nikula 90cd1bac4e lib: add date range query support
Add a custom value range processor to enable date and time searches of
the form date:since..until, where "since" and "until" are expressions
understood by the previously added date/time parser, to restrict the
results to messages within a particular time range (based on the Date:
header).

If "since" or "until" describes date/time at an accuracy of days or
less, the values are rounded according to the accuracy, towards past
for "since" and towards future for "until". For example,
date:november..yesterday would match from the beginning of November
until the end of yesterday. Expressions such as date:today..today
means since the beginning of today until the end of today.

Open-ended ranges are supported (since Xapian 1.2.1), i.e. you can
specify date:..until or date:since.. to not limit the start or end
date, respectively.

CAVEATS:

Xapian does not support spaces in range expressions. You can replace
the spaces with '_', or (in most cases) '-', or (in some cases) leave
the spaces out altogether.

Entering date:expr without ".." (for example date:yesterday) will not
work as you might expect. You can achieve the expected result by
duplicating the expr both sides of ".." (for example
date:yesterday..yesterday).

Open-ended ranges won't work with pre-1.2.1 Xapian, but they don't
produce an error either.

Signed-off-by: Jani Nikula <jani@nikula.org>
2012-10-31 16:55:32 -03:00
..
database-private.h lib: add date range query support 2012-10-31 16:55:32 -03:00
database.cc lib: add date range query support 2012-10-31 16:55:32 -03:00
directory.cc lib: Perform the same transformation to _notmuch_database_find_directory_id 2012-05-23 22:30:32 -03:00
filenames.c lib: fix NULL checks for filenames iterators 2012-09-01 23:03:11 -03:00
gen-version-script.sh lib/gen-version-script.h: add getline and getdelim to notmuch.sym if needed 2011-09-05 07:44:14 -03:00
index.cc Convert non-UTF-8 parts to UTF-8 before indexing them 2012-02-29 07:41:39 -04:00
libsha1.c fix sum moar typos [comments in source code] 2011-06-23 15:58:39 -07:00
libsha1.h fix sum moar typos [comments in source code] 2011-06-23 15:58:39 -07:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local lib: add date range query support 2012-10-31 16:55:32 -03:00
message-file.c Fix appending of Received headers 2011-06-10 17:03:14 -07:00
message.cc lib: Treat messages in new/ as maildir messages with no flags set 2012-06-10 20:14:56 -03:00
messages.c lib: fix messages.c build warn 2012-01-10 06:33:23 -04:00
notmuch-private.h Fix the COERCE_STATUS macro 2012-09-27 12:51:51 -03:00
notmuch.h lib: Make notmuch_database_get_directory return NULL if the directory is not found 2012-05-23 22:30:55 -03:00
parse-time-vrp.cc lib: add date range query support 2012-10-31 16:55:32 -03:00
parse-time-vrp.h lib: add date range query support 2012-10-31 16:55:32 -03:00
query.cc lib: change default for notmuch_query_set_omit_excluded 2012-04-07 22:58:33 -03:00
sha1.c Typsos 2009-11-18 03:21:36 -08:00
string-list.c Fixup string list author 2011-03-21 02:45:18 -04:00
tags.c Implement an internal generic string list and use it. 2011-03-21 02:45:18 -04:00
thread.cc lib: Add the exclude flag to notmuch_query_search_threads 2012-03-02 08:28:39 -04:00