diff options
author | Adrian Perez <aperez@igalia.com> | 2009-11-19 01:07:22 +0100 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-11-19 01:42:31 +0100 |
commit | e5da2b701fc172d2255f205414f18c40f4343fbb (patch) | |
tree | 0e2e7769b776169cd7ee7ee320c28a6c4ea4db58 /lib | |
parent | b6c4978fda90115caf560c0ef1c05251cbb977fd (diff) |
Allow lone "not" search operators
As suggested by Keith in FLAG_PURE_NOT allows for expressions like:
notmuch search NOT tag:inbox
Note that this way a search like:
notmuch search foobar NOT tag:inbox
should not be written instead:
notmuch search foobar AND NOT tag:inbox
In my opinion, the latter feels more natural and is somewhat more explicit.
It gives a better clue of what the search is about instead of assuming that
an implicit AND operator is there.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/query.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/query.cc b/lib/query.cc index a869f3e..75f22b3 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -97,7 +97,8 @@ notmuch_query_search_messages (notmuch_query_t *query, Xapian::QueryParser::FLAG_PHRASE | Xapian::QueryParser::FLAG_LOVEHATE | Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE | - Xapian::QueryParser::FLAG_WILDCARD); + Xapian::QueryParser::FLAG_WILDCARD | + Xapian::QueryParser::FLAG_PURE_NOT); if (strcmp (query_string, "") == 0) { final_query = mail_query; |