X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fquery.cc;h=7fdf992de7162a758d6ea869515ad07e15aaa4a6;hb=87934c432c4bee9df09f268a3f05933c59c2caf1;hp=d633fa3d908ae08c1e1493b6caa29b8d3570c409;hpb=040c3236afcf95bead0324a48c2e0b9cd7934993;p=notmuch diff --git a/lib/query.cc b/lib/query.cc index d633fa3d..7fdf992d 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -652,9 +652,9 @@ _notmuch_query_count_documents (notmuch_query_t *query, const char *type, unsign /* * Set the checkatleast parameter to the number of documents * in the database to make get_matches_estimated() exact. - * Set the max parameter to 0 to avoid fetching documents we will discard. + * Set the max parameter to 1 to avoid fetching documents we will discard. */ - mset = enquire.get_mset (0, 0, + mset = enquire.get_mset (0, 1, notmuch->xapian_db->get_doccount ()); count = mset.get_matches_estimated();