Skip to content

Spotlight

On leaving the Spotlight behind

Of late, my Mojave-running iMac has been having major Spotlight problems: Occasionally I'd find it rebuilding the main index, despite me not having done anything to require such an action. Even worse, though, is that it would stop working entirely in Mail until I rebooted.

My main use of search in Mail is to help our customers find lost license files—I have records that go back to 2010, so I can usually find their license if they did buy from us. With Spotlight broken, I'd have to login to the two different cart providers we've used over the years to find license files. Having a functional Spotlight in Mail was fairly job-critical to me.

Some digging showed that a process named suggestd was repeatedly crashing…

When this happened, it seemed it would often, but not always, kill Spotlight in general and in Mail. After a lot of debugging, I gave up on fixing the suggestd crash—it's stil crashing multiple times a day—and instead, set out to find another way to search my Mail archives without the help of Spotlight.

I wanted to offload all that historical Mail data to some other app whose search feature wouldn't be dependent on a functional Spotlight. And so, the search began.

tl;dr summary: I chose EagleFiler, a long-lived Mac app that works wonderfully for this task (and many others). It creates its own indices, so it's not reliant on Spotlight, and it's quite speedy at ingesting large amounts of Mail. An unexpected side benefit is that the database is small enough—and fully self-contained—that it's easy to sync to my laptop—so I now always have my email archives available.

[continue reading…]



What to do if Spotlight in iOS11 seems out of focus

I've updated three devices to iOS11, and on my iPad mini and iPhone, Spotlight was behaving very strangely. How strangely? While trying to launch the sports score reporting app theScore, Spotlight apparently thought PCalc was the best match:

(And no, the 9:41am time indicator was not planned!)

If I finished typing out the entire name, then Spotlight would match…but that's not how it's supposed to work.

To make things more confusing, this was happening with only some searches—others worked just fine. My iPad, on the other hand, had a fully functional Spotlight; all searches worked as expected. At first I thought Spotlight was somehow broken on the two devices, but a quick trip into Settings > Siri & Search revealed the problem…

[continue reading…]



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…]



On the uselessness of search in macOS Mail

For the last couple macOS releases, I've had nothing but trouble searching in Mail. Note that I didn't write "trouble searching mail," but rather, "trouble searching in Mail." For example, today I needed to find an email from my business partner Peter about a hidden pref in Butler. (I was hoping this pref could help a user who was having problems with the pasteboard in a certain app.)

Update: See this post for a possible solution.

Based on a document on my hard drive, I knew the name of the default was Pasteboard Normalization Interval, but I couldn't remember the syntax of the defaults write command to set its value. So I searched in Mail…

So clearly, no emails in my database contain the words I'm looking for, right? Here's the exact same search, run in Spotlight:

Not one but two email messages match my search, and provided the needed syntax for the command.

Wait, I know what you're thinking: "Ahh, look, it's in quotes!" Doesn't matter; searching Mail for "Pasteboard Normalization Interval" still results in zero matches. Searching on even one word of the phrase, like Normalization, also finds no matches.

Again, I know what you're thinking: "Oh, I bet the Mail index is screwed up." Nope; even after rebuilding the index on all 250,000+ messages in my database, no matches are found. (And yes, I let the index complete its rebuild, which took hours.)

I've heard from others that search in Mail works for them. But it's a no go for me, and I know, for others. So something's wrong, but I don't know exactly what it is, nor how to fix it.

So for now, I have to rely on Spotlight to search Mail…or a third-party app, but more on that in a bit.



Re-center the Spotlight search window

Starting with OS X 10.11 (El Capitan), the Spotlight search box was no longer anchored to the menu bar. Instead, it became a floating box you could move around. While this is incredibly useful, I couldn't figure out how to get the box back to center, so I did what any normal person would do: I asked the Twitterverse … and as hoped, the Twitterverse came through:

It really is that simple—just click-and-hold on Spotlight's menu bar icon to recenter the search box. And now, a gratuitous video (because I need all the practice I can get with screen recordings!).

Hooray for simple solutions, boo for Apple hiding them from easy discovery: The built-in help references the ability to move the box, but not how to move it back.