mu icon indicating copy to clipboard operation
mu copied to clipboard

parser: Deal with dash-separated query values

Open c3d opened this issue 4 years ago • 2 comments
trafficstars

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]

c3d avatar Oct 28 '21 17:10 c3d

A query on tags fails, apparently. I need to look at it.

c3d avatar Oct 29 '21 09:10 c3d

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"

wavexx avatar Oct 31 '21 13:10 wavexx

Thanks for the effort! #2167 has been fixed now in a different way, so closing this.

djcb avatar Oct 29 '23 07:10 djcb