[PATCH 1/2] lib: centralize query parsing, store results.

2017-03-03 Thread David Bremner
The main goal is to prepare the way for non-destructive (or at least less destructive) exclude tag handling. It does this by having a pre-parsed query available for further processing. This also allows us to provide slightly more precise errorr messages. --- lib/query.cc | 65

[PATCH 2/2] lib: query make exclude handling non-destructive

2017-03-03 Thread David Bremner
We filter added exclude at add time, rather than modifying the query by count search. As noted in the comments, there are several ignored conditions here. --- lib/query.cc | 55 -- test/T060-count.sh | 1 - 2 files changed, 37

v6 of nondestructive excludes

2017-03-03 Thread David Bremner
I decided to squash the first two patches id:20170225160913.22844-1-da...@tethera.net together to avoid temporarily marking a test broken. Otherwise the net changes are pretty minimal since the last version. diff --git a/lib/query.cc b/lib/query.cc index 2c6a4ba6..59e9141a 100644 ---

Re: [PATCH 3/4] lib: add mid: as a synonym for id:

2017-03-03 Thread David Bremner
David Bremner writes: > mid: is the url scheme suggested by URL 2392. We also plan to > introduce more flexible searches for mid: than are possible with > id: (in order not to break assumptions about the special behaviour of > id:, e.g. identifying at most one message). I

[PATCH] fixup! lib: regexp matching in 'subject' and 'from'

2017-03-03 Thread David Bremner
--- lib/regexp-fields.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/regexp-fields.cc b/lib/regexp-fields.cc index b2b39504..65108e38 100644 --- a/lib/regexp-fields.cc +++ b/lib/regexp-fields.cc @@ -62,6 +62,11 @@ RegexpPostingSource::init (const Xapian::Database ) it_ =