Re: "search --path=directory/" is lame(-ish)

Subject: Re: "search --path=directory/" is lame(-ish)

Date: Wed, 29 Oct 2014 21:43:02 +0200

To: David Edmondson, notmuch@notmuchmail.org

Cc:

From: Jani Nikula


On Wed, 29 Oct 2014, David Edmondson <dme@dme.org> wrote:
> Adding a terminal slash to a directory name when using --path causes the
> search to fail. Removing the terminal slash produces results.

I think you mean path:, not --path. Anyway, the reason for this
behaviour is that the path components are indexed as boolean terms, not
unlike tags, just with a different namespace. It's all parsed in Xapian,
not in Notmuch. Adding the / variants would mean indexing twice the
amount of terms.

This could be fixed with our own query parser (somewhere at the other
end of the rainbow), but for the time being I don't see a reasonable
fix.

> Given that many shells will add the terminal slash during completion,
> this is lame(-ish).

Given that path: expects a relative path from the maildir root, not just
any path, and the notmuch bash completion script (if you happen to use
bash) does exactly this, without adding the slash, I'm not too worried.

None of this should be taken as disagreeing with you, though! ;)


BR,
Jani.

Thread: