X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fparse-sexp.cc;h=f031d7904a4bf8246979c819882736b9346f36ed;hp=66dbdb4155b619c8974ac282bdf38f90614fde20;hb=a2785c3919c56a370a7f860f4eeb93846f4a1e63;hpb=3202e0d1feba1ab955ba1c07098c00208f8f0ada diff --git a/lib/parse-sexp.cc b/lib/parse-sexp.cc index 66dbdb41..f031d790 100644 --- a/lib/parse-sexp.cc +++ b/lib/parse-sexp.cc @@ -1,5 +1,4 @@ -#include -#include "notmuch-private.h" +#include "database-private.h" #if HAVE_SFSEXP #include "sexp.h" @@ -18,7 +17,12 @@ _sexp_to_xapian_query (notmuch_database_t *notmuch, const sexp_t *sx, { if (sx->ty == SEXP_VALUE) { - output = Xapian::Query (Xapian::Unicode::tolower (sx->val)); + std::string term = Xapian::Unicode::tolower (sx->val); + Xapian::Stem stem = *(notmuch->stemmer); + if (sx->aty == SEXP_BASIC) + term = "Z" + stem (term); + + output = Xapian::Query (term); return NOTMUCH_STATUS_SUCCESS; }