aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/query.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/query.cc')
-rw-r--r--lib/query.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/query.cc b/lib/query.cc
index 53d505a5..68ac1e40 100644
--- a/lib/query.cc
+++ b/lib/query.cc
@@ -219,13 +219,14 @@ notmuch_query_search_messages (notmuch_query_t *query)
if (query->exclude_terms) {
exclude_query = _notmuch_exclude_tags (query, final_query);
- exclude_query = Xapian::Query (Xapian::Query::OP_AND,
- exclude_query, final_query);
if (query->omit_excluded_messages)
final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,
final_query, exclude_query);
else {
+ exclude_query = Xapian::Query (Xapian::Query::OP_AND,
+ exclude_query, final_query);
+
enquire.set_weighting_scheme (Xapian::BoolWeight());
enquire.set_query (exclude_query);