mu
mu copied to clipboard
parser: Deal with dash-separated query values
Xapian uses - as a word separator, so a query like mu find s:kata-containers
would find no results.
This commit brute-forces it by replacing - with a [-] regexp and
transparently turning the query into a regexp query when this situation occurs.
Fixes: #2167
Signed-off-by: Christophe de Dinechin [email protected]
A query on tags fails, apparently. I need to look at it.
I've been bitten by the word separator, however I'm not sure turning the search into a regexp is a good idea. It it would unsuspectingly turn a fast query into a slow one.
Wouldn't it make more sense to turn this transparently into a phrase search instead?
this-that => "this that"
Thanks for the effort! #2167 has been fixed now in a different way, so closing this.