How to determine when your Spotlight index needs to be rebuilt

SpotlightIconXThe Spotlight index in OS X is the database used for quickly accessing file information on your Mac. While this is primarily used for finding files on your system, there are several other services that use Spotlight’s information, and if there is any damage to Spotlight then you might see odd problems and behaviors dotted throughout your system.

1. Search results not working

The primary indication that Spotlight’s index needs to be rebuilt is if your Spotlight search is not working properly. That is, if you type the first few characters of a file’s name you might see the desired file appear, but if you enter additional characters of the name then the file might disappear from the results list. This indicates the system is not able to properly retrieve search queries from Spotlight’s database.

Spotlight search discrepancy in OS X

In this case, Spotlight shows Calendar as the first result for the search query “calc”.

2. Search not complete

If you have files that you know exist on your system, and regardless of how you search for them they will not show up in Spotlight’s search results, then you likely will need to rebuild your Spotlight index. This same detail goes for the content of smart folders, which are essentially canned Spotlight searches.

3. Search priorities shifted

When you search for documents, Spotlight should learn the ones you prefer from your search, and then give you those as a priority when you next search for the same term; however, if upon searching for the same term you see a different order of your results each time, then you might consider rebuilding Spotlight’s index.

4. Duplicate search results

If you notice any duplicates for the same file showing up in your Spotlight results, and you do not have a local system clone, manual backup, or other intended duplicate of your files available to your system, then you might need to rebuild Spotlight. Note that if you do duplicate many of your files to a single location, then consider adding this drive or folder to Spotlight’s Privacy list so it is not included in your searches.

5. Hard drive space usage calculations incorrect

Finally, when you get information on your Mac from the Apple menu, and use the Storage tab to view the data usage on your hard drives, if these values seem to not agree with the Finder information window’s calculation of your drive usage, or if they seem to jump around rather sporadically, or if they are disproportionate (such as the bar being only one color), then reindexing your drive should fix that.

Spotlight free disk space calculations

Major differences in the space calculations in these two areas indicate problems with Spotlight’s index.

How to reset the Spotlight index

To reset your Mac’s Spotlight index, you can use Terminal-based approaches, but this adds complexity to a relatively easy way to rebuild your Spotlight index, which is to add your entire hard drive to Spotlight’s Privacy list, and then remove it:

  1. Go to the Privacy tab in the Spotlight system preferences
  2. Click the Plus button
  3. Press Shift-Command-C to reveal your hard drives (if they are not available otherwise)
  4. Hold the Command key and click your various drives to add them to your selection
  5. Click the “Choose” button to add them to the Privacy list
Spotlight privacy list in OS X

With your hard drive(s) added to the Privacy list, remove them immediately, and then Spotlight will re-index your drive.

Following this addition, which will have the system remove the Spotlight index from the drives, simply remove the drives from the list, and the system will re-create the Spotlight index on them. Note that doing this will have the system work a little, and you should see the progress of the rebuild in the Spotlight menu, but when finished then these problems and perhaps others that revolve around the Spotlight index should go away.

4 thoughts on “How to determine when your Spotlight index needs to be rebuilt

  1. Chip

    Great timing for this article. For some reason when trying to launch DEVONthink Pro, Spotlight stopped finding the app when I typed ‘dev’ and would only see the app after I typed out the whole name. I reindexed the hard drive and an hour or so later everything is back to normal

  2. Alexander

    I have a Synology NAS and always struggling with searching some files on it. Is it possible to index a NAS Drive with Spotlight?

  3. JB

    I finally gave up on spotlight. It passes all the tests above for its index being current but it just doesn’t work very well.

    For example: I type “somefile.” into spotlight and I can see the file “somefile.c” that I’m looking for. But when I add the “c” so that I’ve typed “somefile.c”, it disappears from the spotlight results. If I try to find the file by typing in a line of text that I know exists in the file, spotlight can’t find it. It’s a waste of my time trying to figure out what it wants.

    My freeware text editor has a much better file search function. It’s slower, but it works.

  4. MaX

    Is there a way to prevent Spotlight indexing from scratch (which may take eight hours or more!!!), and instead just update the current index in seconds or minutes?


Leave a Reply to Chip Cancel reply