couple of naive questions about search patterns

Carl Worth cworth at cworth.org
Fri Oct 29 16:26:29 PDT 2010


On Fri, 16 Jul 2010 11:21:58 +0200, Michal Sojka <sojkam1 at 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 at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20101029/277834ca/attachment.pgp>


More information about the notmuch mailing list