aboutsummaryrefslogtreecommitdiff
path: root/lib/parse-sexp.cc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-08-24 08:17:32 -0700
committerDavid Bremner <david@tethera.net>2021-09-04 17:07:19 -0700
commit4083fd8bec7a34cf9c6a722b7dd511e0d31712f6 (patch)
tree9948f0a63e7a4a79718a747bd84112795f7e0f1b /lib/parse-sexp.cc
parentb3bbaf1bc27d79b8191d296998f695be5be3146a (diff)
lib/thread-fp: factor out query expansion, rewrite in Xapian
It will be convenient not to have to construct a notmuch query object when parsing subqueries, so the commit rewrites the query expansion (currently only used for thread:{} queries) using only Xapian. As a bonus it seems about 15% faster in initial experiments.
Diffstat (limited to 'lib/parse-sexp.cc')
-rw-r--r--lib/parse-sexp.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/parse-sexp.cc b/lib/parse-sexp.cc
index 84914296..17401f47 100644
--- a/lib/parse-sexp.cc
+++ b/lib/parse-sexp.cc
@@ -219,8 +219,6 @@ _sexp_to_xapian_query (notmuch_database_t *notmuch, const _sexp_prefix_t *parent
Xapian::Query &output)
{
if (sx->ty == SEXP_VALUE) {
- std::string term = Xapian::Unicode::tolower (sx->val);
- Xapian::Stem stem = *(notmuch->stemmer);
std::string term_prefix = parent ? _find_prefix (parent->name) : "";
if (sx->aty == SEXP_BASIC && strcmp (sx->val, "*") == 0) {