This morning I tried to open Mail on my Mac and was using Spotlight for it as usual. But despite a dictionary-, web- and wikipedia-search nothing was found.
The Spotlight index was somehow corrupted and I tried to fix it by running mdutil (manages the metadata stores used by Spotlight). Unfortunately my boot volume was not in the list of indexed volumes.
$ sudo mdutil -as
Trying to turn the indexing on was not possible for “/” or “/Volumes/Macintosh\ HD”.
$ sudo mdutil -i on -E /Volumes/Macintosh\ HD
/:
Error: unable to perform operation. (-400)
No index.
After I deleted the Spotlight directory and killed all “mdworker” processes via the Activity Monitor, mdutil was finally willing to start rebuilding the index. A system reboot should have made it as well as killing the mdwokers directly, I guess.
$ sudo rm -Rf /.Spotlight-V100
$ sudo mdutil -i on -E /
My Spotlight also broke. I followed your guide up to the last command. But when i try to “restart” the Spotlight with “$ sudo mdutil -i on E /” i get a “Error: unable to perform operation. (-400) No Index”. Error.
Do anyone have a solution?
A restart seems to get the index kick-started.
Hi Jacob, removing all mdworker processes seems to be essential. Good to hear that a system restart started the indexing. A colleague said “sudo killall -9 mdworker” is the recommended way to get them all out of the system.
Pingback: Spotlight unter Lion
It worked! I just quit the SystemUIServer with Activity Monitor before using your command lines. Thank you
Thank you all, this solved the problem here:)
Still actual info as of 2013… deleted /.Spotlight-V100 … However now I had no mdworker at all, so I killed mds instead and viola – got a new mds and a bunch of hard working mdworker reindexing my drive