7

I copied all my data to an external hard drive and used that as my main hard drive for a few days. After that I noticed a slight delay when bringing up spotlight, so that when I search for "Safari", it searches for "fari" instead, as I am used to being able to start typing close to instantly.

I just associated that with the fact that booting from an external drive is slower, however, even now when I have copied the data back to my internal drive and boot from that, the delay persists. I have reindexed my drive twice.

The problem also exists on the Guest user and my other user, so the problem does not have anything to do with my user/home folder. I am on macOS Mojave 10.14.3.

EDIT: Even after updating to 10.14.4, the problem still exists.

  • 1
    Try booting in Safe Mode as mentioned here. – user310476 Mar 4 at 19:13
  • 1
    How did you reindex? – Allan Mar 4 at 22:29
  • @Allan by excluding the drive from Spotlight and then including it again. – DisplayName Mar 4 at 23:14
  • I would check which instance of Spotlight you are launching. If you’re still launching the instance that’s on the external drive, the delay makes sense. – Wildcard Mar 5 at 6:34
  • 1
    @chrisdahfuh Sorry if I was unclear, I edited it now to make it more clear. I specifically meant the problem does not have anything to do with user/home folder, as the problem exists across all users. – DisplayName Mar 6 at 22:31
1

Note: I can't take credit for these solutions, however a few of them have worked for me in the past.

Solution #1: Kill SystemUIServer

Launch ‘Activity Monitor’ (located in /Applications/Utilities/) Locate the process ‘SystemUIServer’, highlight it, and click the red button “Quit Process” Within a few seconds the menubar will rebuild itself and often Spotlight will magically work

Solution #2: Rebuild the Spotlight Index manually

Launch ‘Terminal’ (located in /Applications/Utilities/) At the command prompt, type this exactly: sudo mdutil -E / You will be asked for your password, provide it, as this command requires administrator privelages to run You will receive a confirmation message saying that index will be rebuilt Wait until index is finished rebuilding, this can take a while depending on the size of your hard drive, amount of files, etc. Note: You can also rebuild the Spotlight index with MainMenu, mentioned in Solution #4

Solution #3: Change Desktop Resolution

This is a strange fix but it works everytime for me when my Spotlight menu icon highlights but the search form doesn’t appear Open “System Preferences” via the Apple Menu Click ‘Displays’ and select a resolution smaller than what you are currently using, 640×480 seems to always work Select your native resolution again, changing your screen resolution back to normal The Spotlight search tray will magically become available again

Solution #4: Clear caches and preferences

Clear caches and preferences relating to Spotlight, this is best done through either the free tool OnyX, or the free tool MainMenu, I recommend MainMenu because it’s easier for novices

Note: Some users discover that just cleaning the Font caches is adequate to repair a screwy Spotlight, but it won’t hurt to clear them all

Solution #5: Reboot your Mac

This should almost be listed as #1 just because sometimes a simple reboot will fix Spotlight, but if I can avoid a reboot I will, and often, a reboot isn’t good enough What do MDS and MDWorker have to do with Spotlight? The MDS process and mdworker processes usually run concurrently on your Mac when Spotlight is indexing your Mac. Let the processes finish running to complete a relevant search index of your Mac filesystem.

  • I already did #1, #2, #4 and #5, #3 didn't work either. – DisplayName Mar 5 at 22:24
1

It's better to check a few things first. There may be a (corrupted) file of folder, which causes Spotlight to index forever.

  • open Activity Monitor
  • search for mdworker
  • click on mdworker with highest CPU usage
  • click on Inspect (2nd icon in upper toolbar)
  • click on Open Files and Ports
  • if you can locate the corrupted folder, move it to a different location

Excluding the drive under System Preferences > Spotlight > Privacy will not work, if there was a corrupted file, or indexing hanged at some point.


Indexing file may be corrupt

sudo -i
rm -R /.Spotlight-V100
mdutil -i on /
mdutil -E /

It's worth mentioning that re-indexing, nor re-enabling Spotlight will never delete the index at all. So deleting it manually could fix the problem.


If none of these solved the problem for you, it can be also helpful to see the output of the following.

mdutil -sav
mdimport -L
-1

Here's a simple solution that I believe will remove the dramatic pauses you're experiencing.

In System Preferences, go to Spotlight, then select the Privacy tab and add (+) the external drive's name to the list of locations that Spotlight will be -prevented- from scanning.

Then wait for a minute and do a system restart from the Apple menu.

When it comes back up, I'm betting that all will be well.

I'm guessing that the root cause for the pauses is Spotlight checking for the existence of the external drive's own index before it begins showing results from your searches.

  • I don't actually have access to the drive anymore, do you know which which file to delete to reset the Spotlight Privacy tab settings? – DisplayName Apr 2 at 13:56
  • OK, I was able to get access to it again, and this didn't work either unfortunately. – DisplayName Apr 2 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .