Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

In Finder, the search bar in the top right corner has ceased to function. Observe:

failed search

Obviously, there should be something with the letter "s" in it. But no results appear. It's just blank. Anything I search for, anywhere I search for it, it all fails.

share|improve this question
    
Just curious, is a little wheel (or gear) spinning in the right-hand corner? –  daviesgeek Nov 3 '11 at 5:59
    
@daviesgeek Nope. –  Mahnax Nov 3 '11 at 14:20
    
Can you please open your activity monitor and check if mdworker service is running? –  doc_180 Nov 4 '11 at 5:17
    
@doc_180 Not on my Mac right now, but when I get home I'll do that. –  Mahnax Nov 4 '11 at 14:24

2 Answers 2

up vote 12 down vote accepted
+50

Other than your Finder having jaundice, this should be a simple fix. The following command will clear the volumes local store and rebuild it if necessary; Open up Terminal and type:

# sudo mdutil -E /
  • You will be asked for your password, provide it, as this command requires administrator privileges to run.
  • After confirming your Spotlight index will be re-built and your files should appear in the search. ( Depending on the size of your HDD it can take a while )

To check if all volumes have indexing enabled or disabled use:

# mdutil -s -a

To toggle (enable/disable) indexing on all volumes:

# mdutil -a -i

These commands are safe to use when/if you encounter similar issues as described in the question.


Complete options available:

 -p  Spotlight caches indexes of some network devices locally.  This option requests
     that a local caches be flushed to the appropriate network device.

 -E  This flag will cause each local store for the volumes indicated to be erased.
     The stores will be rebuilt if appropriate.

 -i on | off
     Sets the indexing status for the provided volumes to on or off.  Note that index-
     ing may be delayed due to low disk space or other conditions.

 -s  Display the indexing status of the listed volumes.

 -a  Apply command to all volumes.

 -v  Print verbose information when available.
share|improve this answer
    
This worked, thank you very much. –  Mahnax Oct 7 '11 at 23:48
    
heh, looks like it got over it ;-) –  l'L'l Oct 7 '11 at 23:49
    
Yep, I realized it was disturbingly yellow, and switched it to a more soothing grey. –  Mahnax Oct 7 '11 at 23:49
    
No problem at all -- quick and easy. Make sure you check the answer as correct. take care. –  l'L'l Oct 7 '11 at 23:50
2  
@Mahnax is indexing enabled? To turn it on (or to make sure it's on) for all volumes, use sudo mdutil -a -i on in Terminal and then use the command @ioi provided. –  koiyu Nov 1 '11 at 8:54

Being as the UI is a better way to go than to jump right away into Terminal, try the following from Apple's support documentation:

  1. From the Apple menu, choose System Preferences.
  2. Click Spotlight.
  3. Click the Privacy tab.
  4. Drag a folder or even an entire volume (your hard drive) to the list.
  5. Remove the item or volume you just added.

Failing these steps and the steps advised by the others, try creating a new user and seeing if search works in Finder. If it still does not work, then search is broken system-wide and an Archive & Install will not help. You'll want to back up your data and reinstall the OS. If an Apple Store is close, they can be of assistance here (no charge).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.