unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Kevin Foley <kevin@kevinjfoley.me>,
	Teemu Likonen <tlikonen@iki.fi>,
	notmuch@notmuchmail.org
Subject: Re: Searching for an Exact Email Address
Date: Sun, 02 Feb 2020 13:00:52 -0400	[thread overview]
Message-ID: <87r1zc3ovv.fsf@tethera.net> (raw)
In-Reply-To: <m2k155112y.fsf@Kevins-MBP.home.lan>

Kevin Foley <kevin@kevinjfoley.me> writes:

> David Bremner <david@tethera.net> writes:
>
>> Also useful is setting NOTMUCH_DEBUG_QUERY in the environment. This will
>> show the parsed Xapian query. In my case this shows both
>> 'to:"example@email.com"' and to:"example@email.com" end up parsed the
>> same way, so I guess the problem is elsewhere.
>
> I should have mentioned that I tried using NOTMUCH_DEBUG_QUERY with many
> different quoting variations and kept getting the same final query:
>
> Query((Tmail AND (XTOexample@1 PHRASE 3 XTOemail@2 PHRASE 3 XTOcom@3)))
>
> It looks like the punctuation is being stripped; I get the same final
> query for `notmuch search 'to:"example email com"'`.  Is this the
> expected behavior?

Yes, that's how phrases work.

> I tried this as well but per notmuch-search-terms(7) it looks like regex
> isn't supported for the "to" field.

Ah right. it's really an implimentation quirk that that From: addresses
are stored in the form needed for regex searching.

> Also as a side note, I don't think the quoting is necessary as per the
> "searching" documentation [0], "... e-mail addresses are also treated as
> phrases.".

Quoting is certainly necessary for phrases containing spaces, but yes,
as documented phrases can also be built with punctuation.

      reply	other threads:[~2020-02-02 17:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-01 21:29 Searching for an Exact Email Address Kevin Foley
2020-02-02  0:38 ` David Bremner
2020-02-02  6:12 ` Teemu Likonen
2020-02-02 12:17   ` David Bremner
2020-02-02 15:05     ` Kevin Foley
2020-02-02 17:00       ` David Bremner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1zc3ovv.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=kevin@kevinjfoley.me \
    --cc=notmuch@notmuchmail.org \
    --cc=tlikonen@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).