Searching with Mail.app
I ran into an interesting problem last night that yielded little to no documentation when I searched Google. The problem involved Mail.app and my ability to search for messages. I'm a adamant user of MailTags, which is a plugin for Mail.app on Max OS X that adds tagging support to e-mail messgaes. MailTags is actually one of those few Shareware applications actually worth paying for. Well, I was trying to run a search for a MailTags keyword and nothing was coming up, but I knew there were messages tagged with that keyword. To make things weirder, when I went into the MailTags preferences and tried to "collect" tags and projects from my message index it would clear out my preference lists. Something was wrong, but I couldn't figure out what. Then I realized that searching "entire message" didn't work as well. At first I chalked this up to a bug in MailTags, but when I uninstalled MailTags I still couldn't search the body of messages. Well, it turns out that Mail.app's search methods utilize Spotlight, and MailTags also depends Spotlight's searching power. A couple of weeks ago I used Onyx to disable Spotlight entirely. See, I hardly ever use Spotlight... the truth of the matter is that I'm a QuickSilver fiend. I've been for awhile, and haven't had much use for Spotlight. I disabled Spotlight thinking it might save a small amount of processing power behind the scenes. I'm sure I was right, but whatever it saved me wound up being negligible in the long run. When I disabled Spotlight I essentially neutered Mail.app of it's search capabilities. Turning Spotlight back on and then reindexing my drive solved the problem, but it turns out this one of those areas where Onyx seems quirky. I suggest if you run into this problem turning to your terminal and entering this into the prompt:
sudo mdutil -i "/Volumes/Macintosh HD" sudo mdutil -E "/Volumes/Macintosh HD"
In case you were wondering, mdutil is a "Utility to manage Spotlight indexes", and the first line using the "i" flag toggles the indexing on or off for the specified drive (BTW, substitute your drive's name in for "Macintosh HD" as necessary). That second line with the "E" flag erases any existing index and then begins rebuilding the index from scratch. That quick fix, and some time spent indexing solved all of my Mail.app search woes. So, if you are experiencing trouble with Mail.app searching, or any other app for that matter and may have tinkered with Spotlight or other system related settings, consider running the above commands and fixing your Spotlight indexing.
Post Comment: