The 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.
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.
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.
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:
- Go to the Privacy tab in the Spotlight system preferences
- Click the Plus button
- Press Shift-Command-C to reveal your hard drives (if they are not available otherwise)
- Hold the Command key and click your various drives to add them to your selection
- Click the “Choose” button to add them to the Privacy list
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.