Searching for phrases in the body of an email

Jani Nikula jani at nikula.org
Sat Jul 18 08:53:53 PDT 2015


On Jul 18, 2015 6:32 PM, "Suvayu Ali" <fatkasuvayu+linux at gmail.com> wrote:
>
> Hi Xu,
>
> On Sat, Jul 18, 2015 at 10:54:30AM -0400, Xu Wang wrote:
> >
> > First note that I believe notmuch search is case insensitive by
> > default, so your grep should be case insensitive as well.
>
> Good point, I tried that, didn't change the numbers much.  The number of
> matches from grep went up to 24, whereas notmuch count says 463.
>
> > More importantly, I'm not sure how 'no NEAR "plain text" ' syntax is
> > parsed. Maybe it is parsed as {no NEAR plain} or {text}.
> >
>
> Exactly, that's what I do not understand.
>

export NOTMUCH_DEBUG_QUERY=1

might help.

> > You would like to search for the exact phrase, correct? How about the
> > following?
> >
> > notmuch search no adj plain adj text
>
> Good suggestion.  I tried it, and gives me very consistent numbers:
>
> $ notmuch count -- no ADJ plain ADJ text
> 20
> $ notmuch show -- $(notmuch search --output=messages -- no NEAR \"plain\
text\") | \
>       grep -c -iE 'plain[[:space:]/]+text'
> 24
>
> Of course this does not help me solve my original goal, but I guess now
> I can try different queries based on your idea.
>
> Thanks a lot!
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20150718/f3603d9e/attachment.html>


More information about the notmuch mailing list