Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Entire Message vs. Subject searches in Mail Apps
Tiger only hintI rely very heavily on Mail's search feature to find mail from hundreds of companies that send me information on a regular basis. I was a bit surprised the other day when I was searching all mailboxes using the 'Entire Message' filter (what you get with the default ?-F), and it was unable to return mail that I knew contained the word I was searching for.

It turns out that Mail won't always search the Subject when you have Entire Message selected, though I've not figured out yet when it does and when it doesn't. For example, I did a search for the word "Stitcher" to look for press releases and correspondence about the program with that name. An 'Entire Message' search found three pieces of mail. Switching the filter to Subject returned 22 matches.

However, when I sent myself a piece of mail with a made-up word in the Subject and searched Entire Message, it found it. I have no idea what makes Mail find it sometimes and not find it other times. I use an IMAP server, so I'm curious as if the IMAP headers might be confusing Mail. So lacking better info, consider this a heads-up -- if you're searching for something that you're pretty sure is in the Subject field, switch to a Subject search to see all the matches.

[robg adds: I think this is actually expected behavior, though in practice, it can lead to some seemingly wrong results. Mail's help explains the difference in the two search types:
If you search in the From, To, or Subject fields in selected mailboxes, Mail finds messages that contain the entire search phrase, in the order you entered the words.

If you search the entire message or search in all mailboxes, Mail only finds messages containing words that have the same prefix (or the same beginning letters) as any of the words you entered in the Search field. The words can be in any order. This is not as complete a search as searching the From, To, or Subject fields in selected mailboxes, since words you search for that appear only inside other words may not be found. For example, if you enter "box" in the Search field, your search won't find the word "mailbox," because "box" is not part of the prefix.
However, even with that said, in my testing, I had some very odd results. The messages I was looking for all had the subject of Monthly Message from Kagi. Running a Subject search on that exact string finds 64 matches. Running an Entire Message search on Monthly, and then sorting by subject, I can see that all 64 messages are there. If I change the search string to Monthly Message and then group by subject, there are only 14 matches listed. So something still seems wrong about the way Entire Message search is working...]
    •    
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[10,830 views]  

10.4: Entire Message vs. Subject searches in Mail | 3 comments | Create New Account
Click here to return to the '10.4: Entire Message vs. Subject searches in Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Entire Message vs. Subject searches in Mail
Authored by: moritzh on Oct 18, '05 08:51:08AM

I have completely disabled Spotlight on my system at the moment which means that while I can search in the "From", "To", "Subject" Fields (because this is done using Mail.app's search functionality using its own SQLITE database stored in the file EnvelopeIndex), I cannot search using the "Entire Message" criterion (because for this, Spotlight functionality and the Spotlight database are used), so I cannot test right now.

However, back when I was still using 10.3, I think I once came to the conclusion that searching in the "Entire Message" meant searching only in the actual message body, not the full text of the raw message source (which you can view with cmd+option+u). That means searching the 'entire message' does not search in _any_ headers, including not only "Received", "Content-Type" etc. which are generally not of interest, but also "Subject", "From" and "To".

As I said, I can't test it now, but I suspect that even though the entire message searching has moved to Spotlight with 10.4, the mechanism has remained the same as before. Perhaps someone else can post back and (not) confirm.

Personally, I'd very much prefer a search on the "Entire message" to apply to the entire message including headers. And, oh dear, I'd also very much prefer an "Entire message" search for "box" to find messages with the word "mailbox" in it, too...

I've never thought about the possibilty that there's a difference in how Mail.app handles the "Entire Message" vs. "Subject" search phrases, so I've never looked that up in the help (thanks for pointing it out).

I've seen some search results that seemed very odd (to say the least) to me just as the original poster and Rob, so taking into account that now there are different search databases as well (SQLITE, Spotlight - which have certain bugs/can become corrupted (independently), e.g. see http://www.macosxhints.com/comment.php?mode=display&sid=20050822185354706&pid=0 - first comment), I gave up trying to understanding exactly how the different searches work.

When a search result doesn't contain something I'm quite sure exists, I always say to myself what my brother used to say when he was very very small whenever he could not _find_ something my parents told him to get: "I can't _look_ for it!"



[ Reply to This | # ]
10.4: Entire Message vs. Subject searches in Mail
Authored by: monickels on Oct 18, '05 09:39:39AM

This is an eternal annoyance to me. I thought maybe it was a problem with the Spotlight index, so I forced a rebuild, to no avail. "Entire Message" should be everything, including headers, attachments, recipients, sender, etc.



[ Reply to This | # ]
10.4: Entire Message vs. Subject searches in Mail
Authored by: jpbjpbjpbjpb on Oct 18, '05 02:22:35PM

No kidding. Entire message means the Entire Message, not just parts of it. This causes me no end of frustration sometimes.

Off to bugreporter to file another bug I guess.



[ Reply to This | # ]