aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/query.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-01-09 11:16:40 -0800
committerGravatar Carl Worth <cworth@cworth.org>2010-01-09 11:16:40 -0800
commit45b1856782beca246cd2670ea6b122b0c9e06fc0 (patch)
treef984eb32c6292041634c898dd0772e7ae5e9b59d /lib/query.cc
parentd12801c8b4d04a50fcb912b75017244fb09658e8 (diff)
lib: Explicitly set BoolWeight when searching.
All notmuch searches currently sort by value (either date or message ID) so it's just wasted effort for Xapian to compute relevance values for each result. We now explicitly tell Xapian that we're uninterested in the relevance values.
Diffstat (limited to 'lib/query.cc')
-rw-r--r--lib/query.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/query.cc b/lib/query.cc
index 9106b92d..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);