IMAP is, in my opinion, the way to go for email. It allows you to view your email from any computer and yet keep a master copy of the email messages on a server. Google has IMAP support built into GMail so that you can use your favorite email client to read your GMail email. So, for quite a while now, I have been using IMAP to connect too my 3 email inboxes. And, being on a Mac, I have been using Apple Mail, sometimes called Mail.app to read my mail. But about 2 weeks ago I noticed that I could not use the Mail search to find matches using "Entire Message" as the target of the search. Here is how I fixed that problem.
Apple Mail uses the OS X Spotlight system to do searching. When it breaks you might see something like I found when searching for a phase I know should return some email hits.

Apple provides a command line tool called mdutil which allows you to turn on and off Spotlight indexing. Indexing is the building of a look-up list that points to the information you are trying to find. The general idea of an index is to create a master list of all of the searchable criteria and to format it in such a way that a computer can look it up quickly.
Example: Rendren has fifty doseays on super villeins, complete with addresses, aliases, friends and foes, police reports, investigation notes and published manifestos. To search these documents quickly Rendren has all of them put into his computer system and indexed. While the computer indexes the files it looks for every non-trivial word and adds it to a look up table. And every time that word appears in a new file that same table gets another reference. Now, when Rendren searches for "death-ray" the computer only has to do one lookup on that index table to find out that "death-ray" appears in 15 different documents. Now Rendren does a search for "death-ray and moon" and the computer uses that same index file to do a lookup on the 15 "death-ray" appearances and the 5 hits on the "moon", cross references them and finds one manifesto from supervillan "Sargent X" about his crazed desire to blow up the moon. And since the computer had created it's search index long before Rendren needed the the information this all took no-time at all. Yeah indexing!
So, what we need to do is tell our computer to delete it's current index and create a new one. Go to Applications->Utilities and open "Terminal" then type the following:
sudo mdutil -E -i on /
Command Breakdown
Once you run the command you should see the magnify glass in the upper right of your screen have a throbbing dot in it's center. Click on it to see how long Spotlight is going to take to recreate your search index:
