Skip to content

search

A possible fix broken search in macOS Mail

Over the weekend, I wrote about my totally useless search in Mail. I got so frustrated by my inability to search in Mail that I decided it was time to for a complete rebuild. I exported all my locally-saved mail, deleted my accounts, quit Mail, trashed its prefs and data files, rebooted, then rebuild it mailbox by mailbox, account by account.

I started with my iCloud account, which I barely use for anything—it has a total of seven messages in the inbox (four of which are iTunes Store receipts), and only 121 sent messages. As a test, I searched for Linea, an excellent drawing app that I had recently purchased. No matches.

At that point, I decided to quit Mail and force Spotlight to rebuild its index overnight. In Terminal, sudo mdutil -i on / will do just that (and take many hours). Today, opened Mail, and search was still dead. Argh! (I had also tried this suggested fix, but it made no difference.)

But doing some random testing today, I discovered a fix! It's a weird fix, but it seems to work:

If I move all the messages from an inbox or local storage folder into a different local storage folder, they'll be indexed and findable. I can then move them back into the inbox or source folder, and they remain findable.
Even more important, newly-added messages seem to be properly indexed, in both the inboxes and the local storage folders.

This doesn't make any sense to me, as any one of my recent actions—rebuilding mailbox indexes, reimporting, and redoing the entire Spotlight index—should have been enough to force a rebuild. But for whatever reason, only manually moving the messages seems to force a rebuild.

Now pardon me while I go back to manually dragging a quarter-million email messages around…



macOS app: Use HoudahSpot for enhanced searches

As I lamented in a recent entry here, macOS Mail search is totally broken for me. I pointed out that I can use Spotlight, but also alluded to a third-party app. That app is HoudahSpot, and it's what I use to not only search Mail, but any time I need a more-powerful search than I can get through Spotlight's interface.

Houdah's UI is a large multi-paned window, with search criteria on the left, results in the middle, and one of file info, Quick Look preview, or text preview in the right-hand pane. Here's how it looked for the same search that failed in Mail:

Using HoudahSpot for a search like this, though, is really overkill—I'd see similar results in Spotlight, because it's a very specific search term that's not going to find a lot of matches. Where HoudahSpot shines is in its ability to build more complex search queries.

[continue reading…]