Spotlight slow and not showing search results

While Spotlight is a great search tool in Mac OS X, sometimes it can get slow or not show proper results. Here are some ways to optimize and troubleshoot when this happens.

While Apple's Spotlight search function is a useful tool, sometimes it may fail to show you items that do contain the search terms you're using. At other times Spotlight may take a while to show you search results, or even bog down your system while it is organizing results. When these problems arise there are a few things you can do to correct them.

In the case of expected results not showing up, try checking your Spotlight preferences to see if you have any folders in Spotlight's privacy list. If so, remove them and wait for Spotlight to index these files and folders (you may see a blinking dot in the Spotlight's spyglass menu icon when this is happening). When the indexing is complete, try performing your search again.

If there are no privacy options listed, or if removing any still does not result in proper search results, then your best bet would be to remove the Spotlight index and have the tool rebuild the index from scratch. There are several ways to do this, including using third-party maintenance utilities and terminal commands, but the simplest approach is to add your entire hard drive to Spotlight's privacy list and then remove it.

  1. Go to the Spotlight system preferences and click the Privacy tab.

  2. Drag your hard-drive icon to the list (do this for all locally mounted filesystems).

  3. Wait a few seconds and then remove the drives from the list.

Once this procedure has been done, wait for Spotlight to rebuild the index, and you should be good to go. If for some reason this still does not yield results, then you can try using maintenance utilities or you can run the following Terminal command to delete the Spotlight index:

sudo rm -rf /.Spotlight-V100

NOTE: Be careful of using the "sudo rm" command, and only use this if you are familiar with the Terminal. Make sure when typing this command that there is NO SPACE between the slash and the ".Spotlight-V100" text.

This command will force the system to remove the Spotlight index in its entirety, so instead of merely updating the Spotlight index the system will have to rebuild it from scratch. See this MacFixIt article for more ways to tackle Spotlight problems via the command line.

Beyond removing and rebuilding the Spotlight index, there are a few things you can do to tailor Spotlight's behaviors and increase the relevance of the results. By default Spotlight will index the entire hard drive, but if you limit Spotlight's scope by adding various items to its privacy list then both indexing and searches will go faster. If you are only interested in using Spotlight to search your personal files, then open the Macintosh HD drive and add all folders except for the Users directory to the Spotlight privacy list. If you want to use Spotlight to find applications also, then add all folders except for the Users and Applications directories to the privacy list. Keep in mind that you also may want to include external disks in this list to prevent them from being indexed.

A last area where Spotlight might have troubles is with various file handler plug-ins you may have installed. To aid Spotlight's indexing of file contents, developers can create plug-ins that direct Spotlight as to what parts of files to use when indexing. If there is a problem with one then it may cause Spotlight to function incorrectly. To troubleshoot these, remove them, restart the computer, and then force Spotlight to rebuild its index. If Spotlight then starts working properly, add the plug-ins back one by one or in small batches, rebuilding the index each time, to isolate which one is causing the problems.

Spotlight plug-ins end with the filename suffix ".mdimporter" and are located in the following directories:

/Macintosh HD/System/Library/Spotlight
/Macintosh HD/Library/Spotlight

You should not need to remove any in the System folder location, as these are the ones Apple includes with OS X and developers do not usually place their plug-ins in this folder. Also, when you remove files from these directories, do not throw them out. Instead, just move them to another folder such as the Desktop, so you can restore them if needed.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.

About the author

    Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.

     

    Join the discussion

    Conversation powered by Livefyre

    Show Comments Hide Comments
    Latest Galleries from CNET
    Uber's tumultuous ups and downs in 2014 (pictures)
    The best and worst quotes of 2014 (pictures)
    A roomy range from LG (pictures)
    This plain GE range has all of the essentials (pictures)
    Sony's 'Interview' heard 'round the world (pictures)
    Google Lunar XPrize: Testing Astrobotic's rover on the rocks (pictures)