Re: couple of naive questions about search patterns

Subject: Re: couple of naive questions about search patterns

Date: Fri, 29 Oct 2010 16:26:29 -0700

To: Michal Sojka, Dmitry Monakhov, notmuch@notmuchmail.org

Cc:

From: Carl Worth


On Fri, 16 Jul 2010 11:21:58 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> No, this is because 're:' in subject is not indexed. See
> skip_re_in_subject() in index.cc.

That's a correct explanation of the problem. But meanwhile, I don't have
any good justification for that code.

I wrote it originally because I was trying to create an indexer that
would be term-for-term compatible with the indexer of sup. But since
that's not a goal of notmuch, we could easily drop this code.

Does anybody see a reason not to do that?

> > BTW: Is it possible to specify beginning(^) or the end in subject
> > search pattern?
> 
> I don't think so.

We don't currently have a way to do that, but I think it could be mighty
handy if we did. It's conceivable that the notmuch indexer could be
augmented to store special terms for beginning-of-line and end-of-line
and then we could make the query parser understand '^' and '$' as
mapping to these terms.

That will be easier to consider after we have a custom query parser,
which is something on my TODO list.

-Carl

-- 
carl.d.worth@intel.com
part-000.sig (application/pgp-signature)

Thread: