X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fquery.cc;h=68ac1e40178548f53dae91a263972eb210fdccf1;hp=53d505a557ba83e81d6e8effd5641b23bbcfccec;hb=c695534df5830d0681f451bd213e75758b532e31;hpb=1351aafac1e8c77e6ee3d2f41ac7445d0e07238d 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);