I'm planning to change prefix values soon, which would break code
like this. So eliminate the fragility by going through our existing
_find_prefix function.
try {
Xapian::Enquire enquire (*notmuch->xapian_db);
- Xapian::Query mail_query ("Kmail");
+ Xapian::Query mail_query (talloc_asprintf (query, "%s%s",
+ _find_prefix ("type"),
+ "mail"));
Xapian::Query string_query, final_query;
Xapian::MSet mset;
unsigned int flags = (Xapian::QueryParser::FLAG_BOOLEAN |