Apple - Spotlight reports "Indexing and searching disabled" in Lion
I had the exact same problem, with all solutions above failing identically. Then I reexamined the directory listing for /
and found a hidden file .metadata_never_index
in the root directory. I removed this file and was able to turn spotlight on again with
mdutil -i
on /
.
mds
is now reindexing the hard disk, all looks good for now.
sudo mdutil -i off /
sudo rm -rf /.Spotlight*
sudo mdutil -i on /
sudo mdutil -E /
1 - turn indexing off
2 - delete Spotlight folder
3 - turn indexing on
4 - rebuild
Does this help?
Also it seems you could use these commands:
sudo mdutil -a -i off
sudo mdutil -a -i on
The other solutions didn't work for me, however the following was the culprit in my case.
Make sure your root/main hard drive isn't in the "privacy" settings for spotlight. For some reason I had the whole hard drive under the "Prevent spotlight from indexing the following locations" list.
You can access this section from System Preferences -> Spotlight -> Privacy