How to fix spotlight search on a Mac

If your Mac’s spotlight has stopped returning the right results, this means the spotlight tool has either crashed while fetching the index or it’s lost the results.
How to fix this Spotlight problem
Let’s check if this issue is affecting just the user account or the whole system.
To do this, log out of your user account and log into another user account. If spotlight is working when logged into the other user account, this means the home folder of the user account experiencing spotlight problems is affected.
Now, use disk utility to check and fix permissions. Reboot and try a spotlight search again. If this doesn’t resolve the problem, follow these next steps.
Go to the “Spotlight” panel within “System Preferences”. Click the “Privacy” tab:
Click the “+” and select your machine’s internal hard drive:
spotlight add hard drive
Now click on the hard drive and click “-” to remove it. This will force the spotlight to re-index the Mac’s files.
spotlight remove hard drive
If this doesn’t resolve your spotlight problem you can try out the following steps using commands within the terminal.
Important: We only recommend following this next step if you’re confident in Terminal and have a current backup of your Mac.
Open Terminal:
Now type in the following commands into Terminal, in the exact order they are shown:

sudo mdutil -i off /
sudo mdutil -i on /
sudo mdutil -E /

Please note: Do not copy and paste the commands, please type them into Terminal.
So, what do these commands do?

  • The first command turns spotlight off
  • The second command turns spotlight back on
  • The final command restarts the spotlight index.

If, after a few minutes, spotlight is still not indexing, try running this command, followed by the three commands above:

sudo rm -rf /.Spotlight-V100