Strange match to my query
Mark Anderson
MarkR.Anderson at amd.com
Tue Jan 25 15:29:22 PST 2011
Hi guys, What's up? ("Notmuch")
Apparently matching on email addresses doesn't work the way I hoped.
While debugging why my to:x at y.com search was matching far too many
entries, I whittled it down to this:
WORD1=hello
WORD2=goodbye
MSGID=junk$(date +%s)
TESTDIR=$(notmuch config get database.path)/.tmp/new
TESTMAIL=$TESTDIR/$MSGID:2,
mkdir -p $TESTDIR
echo Testcase for $WORD1@$WORD2, msgid: $MSGID at junk.com
echo "From: nobody at nobody.com
To: c@${WORD1}.com, K-R@${WORD2}.com
Date: Mon, 24 Jan 2011 23:41:34 -0600
Subject: Error
Message-ID: <$MSGID at junk.com>
Not empty body.=
" > $TESTMAIL
notmuch new
notmuch search --output=files to:$WORD1@$WORD2
notmuch search --output=files to:\"$WORD1@$WORD2\"
Why does that match, but this doesn't?
notmuch search --output=files to:\'$WORD1@$WORD2\'
Apparently single quotes are the only quote for Xapian's parser?
I guess this is a strong vote for the quick integration of the custom
parser with optimization passes that turn emails into phrases that can't
match across multiple emails.
This was just an egregious example of notmuch giving me notmuch of what
I wanted, or actually, far too much of what I didn't want.
Thanks,
-Mark
More information about the notmuch
mailing list