X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fquery.cc;h=2c8d167255bb903a5224d6d5b7ba0408e108bd00;hp=a571a618bdd1350aa7041487af19cdf788834c36;hb=a696119756fb13ef875d01134a84a25ac846a7bb;hpb=70962fabf9c57cda5af26c28894fc9371fd085f2 diff --git a/lib/query.cc b/lib/query.cc index a571a618..2c8d1672 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -134,6 +134,8 @@ notmuch_query_search_messages (notmuch_query_t *query) mail_query, string_query); } + enquire.set_weighting_scheme (Xapian::BoolWeight()); + switch (query->sort) { case NOTMUCH_SORT_OLDEST_FIRST: enquire.set_sort_by_value (NOTMUCH_VALUE_TIMESTAMP, FALSE); @@ -315,7 +317,7 @@ notmuch_query_count_messages (notmuch_query_t *query) { notmuch_database_t *notmuch = query->notmuch; const char *query_string = query->query_string; - Xapian::doccount count; + Xapian::doccount count = 0; try { Xapian::Enquire enquire (*notmuch->xapian_db);