Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Spotlight disabled - and Indexing and searching disabled - solution

I have tried most of the recommendations here - and finally even reinstalled and rolled back my entire PB from Time Machine this night - but Spotlight did not work. Got message in terminal "Indexing and searching disabled".

Solution found on web - below with 2 elements:

1) Need to remove files that block for indexing
2) Turn on indexing - Thanks to Patrick Kinsella

1) Check your root directory for a file called .metadata neverindex
If it's there, delete it.

You can only find it after making invisible files visible (se below)

2) These great hints won’t work if Spotlight is completely disabled (which some people have tried and don’t know how to reverse). If all else fails, follow this procedure:

Make hidden files visible (copy and paste the next line into Terminal:
defaults write com.apple.finder AppleShowAllFiles -bool YES

!!!You need to know that the visible/invisible switch works only after a relaunch of Finder (via Command-Alt-Esc).

Now in (previously hidden) /etc folder in your root/hard drive, find hostconfig, and open it with any text editor.
Does it include this line:
SPOTLIGHT=-YES-
(note the two dashes astride YES)?
If not, type this line at the bottom. Save the file as hostconfig in your root folder (etc folder won’t accept it from a text editor). Now drag and drop this new hostconfig to /etc. This requires your admin password to replace the existing hostconfig.
Reboot, and your spotlight is working. This may be a long way around, but it worked for me.

Now make invisibles invisible again with this line in Terminal:
defaults write com.apple.finder AppleShowAllFiles -bool NO

To fire up Spotlight, you may need to type this into Terminal:
sudo mdutil -i on /
(the slash is important)

If Mail is still not searching inside Entire Message, type this into Terminal to index your old messages:
sudo mdimport /users/YOURNAME/library/mail [or whatever the path to your mailbox message folders.

The combination of these two did the trick for me.

All 10.5.2, Mac OS X (10.5.2)

Posted on Apr 6, 2008 10:21 AM

Reply
6 replies

Apr 17, 2008 6:02 AM in response to John Christiansen

I tried following your tips but when I enter 'com.apple.finder AppleShowAllFiles -bool YES' I keep getting the following error message: '-bash: com.apple.finder: command not found
'. Any other way to make invisible files visible? Also how will I be able to find the file .metadata neverindex? Is it located in the system folder?

Apr 18, 2008 12:20 PM in response to dott

Hi dott,

You need to enter the whole line: (i.e. starting with "defaults....etc...") Copy it from above and insert it.

defaults write com.apple.finder AppleShowAllFiles -bool YES

I do not know of other methods for invisible/visible files - but there might be.

The files was not hard to find for me - after clicking the harddisk icon is came up on the list of files (root/hard drive).

Apr 18, 2008 7:22 PM in response to John Christiansen

This tip is useful, but a way too complicated way to do this. A better and simpler solution is as follows:

1. Login in to your server as an administrator.

2. Open the Terminal application (in your /Applications/Utilities folder)

3. Type the following exactly as written in to the Terminal:

+sudo rm /.metadata neverindex+

It will ask you for your password. I have never seen this file, so you may get a "file not found" error - in which case move on to step 4 anyway.

4. Type the following in to the Terminal:

+sudo mdutil -i on /
+

5. Spotlight in the right corner of your server login should indicate it is indexing, and before long will start working.

I don't believe editing of hostconfig is required at all, and you don't need to do all this stuff with making invisible files visible since you are already in the Terminal anyway.

Hope that helps.

Apr 19, 2008 12:34 AM in response to Jamie Curmi

Hi Jamie,

Thanks for the tip and the simpler way to perform the removeal of the file that stopds indexing. As my own indexing still works after my own fix I'm not able to test your method right now. But I orginally spend sveral days searching the discussions forums and testing out many methods, including your suggetsted step 4 (sudo mdutil -i on /
) - as I see many others have tried, with no succes.

I my case I actully identified the "invisible" file - deleted it - restarted the finder - and got indexing to work.

Could your proposed procedure be turned into some form of a script or part of the Disk Aid application or something?

One interesting question someone should look into is: Why does this files that prevents indexing gets created at all?

Message was edited by: John Christiansen

Spotlight disabled - and Indexing and searching disabled - solution

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.