emacs-notmuch: A Xapian exception occurred parsing query

Olly Betts olly at survex.com
Thu Feb 15 15:54:18 PST 2018


On 2018-02-07, David Bremner wrote:
> The underlying issue is that * is parsed (simplistically) by notmuch
> before passing to Xapian, so only works if it is the entire query.
>
> For cases like you report, where the user has not entered '*', but
> rather it is contained in some generated query string, we could fix the
> problem by adding a prefix like "special:*".

If you're generating the query string, you could presumably just
generate « tag:flagged » for this case.

Though it's generally better not to try to generate a string to parse,
but instead to parse any part(s) the user actually wrote and combine
the resulting Xapian::Query objects with directly constructed objects
for other filters, etc.

> This would allow Xapian to parse it, but only for Xapian versions >=
> 3.5.  How many users of older systems do we think this would affect?
> E.g. users of Debian oldstable (jessie) would have to compile Xapian
> in order to use the newest notmuch.

(That should be >= 1.3.5 I think - certainly 3.5 is wrong).

For Debian oldstable users, there's a backport of 1.4.3:

https://packages.debian.org/source/oldstable-backports/xapian-core

Cheers,
    Olly


More information about the notmuch mailing list