aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2018-04-06 08:43:07 -0300
committerDavid Bremner <david@tethera.net>2018-04-26 22:14:59 -0300
commit64831e8016fcc9877c0dc8e855ec24583cac34ef (patch)
tree467985e8c1cfd718734494dd73fa1316061068ca /lib
parent15aaa41ce2b9667d86a81b3928a71f542ed448a1 (diff)
lib: work around xapian bug with get_mset(0,0, x)
At least Fedora28 triggers this Xapian bug due to some toolchain change . https://bugzilla.redhat.com/show_bug.cgi?id=1546162 The underlying bug is fixed in xapian commit f92e2a936c1592, and should be fixed in Xapian 1.4.6
Diffstat (limited to 'lib')
-rw-r--r--lib/query.cc4
1 files changed, 2 insertions, 2 deletions
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();