Spotlight is one of the fundamental systems on the Mac that enables some of my favorite applications like Hazel. If Spotlight is broken, even if I don’t think I rely on it for search, then my Mac is broken.
Here’s a general process for fixing all sorts of Spotlight related strangeness:
Check your disk
Sometimes Spotlight isn’t the root cause but rather a casualty of a corrupted disk. The best option is to run Disk Utility after booting the Mac in Recovery Mode. There are several options available when rebooting your Mac. Hold down ⌘+R to boot into a clean recovery partition.
Launch Disk Utility. Don’t forget that if you are running FileVault you must first right-click the disk and choose “Unlock” before working on the partition.
Next, repair the disk. Hopefully this goes well. If it doesn’t, try it again and then decide if you believe the good news or the bad news.
After repairing the disk, then repair permissions. Yes, it seems like repairing the disk should do this, but in my experience the permissions are usually still borked after a disk repair.
There’s a couple ways to rebuild your Spotlight index. The common procedure is to add the disk to the Spotlight privacy list and then remove it.
This works most of the time. However, occasionally the disk will still not have Spotlight enabled. The surefire way is to run the following terminal commands:
:::bash sudo mdutil -i off / sudo mdutil -i on /
Replace the / with the path to the volume you want to reindex. The above will reindex your primary volume.
Even on an SSD, Spotlight indexing can be quite time consuming. There’s no good way to monitor the progress other than clicking the Spotlight icon in the upper left hand corner. But it lies like a toddler after chores.
You can run the following terminal command to get the most basic information about what Spotlight is indexing:
:::bash mdutil -s -a -v
Spotlight has gotten better over the years but it still has some issues. The biggest issue is that it refuses to communicate. There’s almost no way to know if Spotlight is having trouble except by the consequences.