Spotlight borked after macOS Sierra update

Config: Late-2013 rMBP running 10.12 (16A323)

Issue: Spotlight appears to be mostly non-functional since upgrading to Sierra. I originally noticed it when searches failed to bring up anything in Mail, and Spotlight itself will only surface results from Dictionary.

What I've Tried:

  1. Add my primary HDD to the Privacy exclusion list in Spotlight preferences (this resulted in a weird (null) error). The idea is adding, then removing will force a reindex.
  2. Run mdutil -sv / to find out what's up, resulting in "Error: unexpected indexing state. kMDConfigSearchLevelTransitioning".
  3. Run sudo mdutil -E / to delete and rebuild the index, resulting in "Error: Index is already changing state. Please try again in a moment."
  4. Run
    sudo su
    launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
    rm -R ./Spotlight-V100/
    launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
    mdutil -E /
    this all works, and I get a brief pause after the last command before it spits out "Indexing enabled." Subsequent attempts at running mdutil -sv / spits out the aforementioned error as cited in #2 above.

Activity Monitor is showing that mds and several mdworker processes are churning most of the CPU cycles (and the fan is fairly vocal), which would imply that it's in the process of reindexing - yet the two ways I'm aware of confirming indexing behavior is not indicating that's the case:

  1. mdutil -sv / is returning that error.
  2. Doing a Spotlight search for anything (or "indexing" specifically) does not show any indexing progress bar.

So… is Spotlight either:

A. Actually indexing, despite both known ways of confirmation indicating it isn't? And, if so, citation(s) on that being the case / when can I expect it to be showing that it is indexing?

B. Actually borked? And, if so, any other ways I can try to resolve absent nuking the partition, doing a fresh install, and restoring from Time Machine?

Thanks in advance!


Did you reboot after #4 above? I think that should work... If not this may help:

sudo touch /.metadata-never-index

Reboot...

sudo rm /.Spotlight-V100/VolumeConfiguration.plist
sudo rm /.metadata-never-index

And reboot again. You can try this for every volume.

See also: http://www.filetypehelp.com/purpose-files-metadataneverindex-file-extension/


After leaving my Mac alone for the weekend, my fears were confirmed and there was never any change to this Spotlight issue. Given the other threads here and elsewhere, it appears that Sierra has some challenges when doing an in-place upgrade.

Resolution:

  1. Confirm you are fully backed up (multiple backups preferred). THIS IS THE MOST IMPORTANT STEP!
  2. Reboot into Recovery Mode (hold down Command-R while Mac begins to boot).
  3. Open "Disk Utility" and erase the macOS partition (You did confirm those backup(s), right?).
  4. Once HD is erased, exit out of "Disk Utility", open "Install macOS Sierra" and install Sierra from scratch.
  5. After install completes, restore from backup.
  6. Get back to your life. ;-)