Spotlight indexing problems

Dear MPU friends, I am hoping that someone here can help me with a Spotlight problem. A week or so ago, Spotlight stopped including anything in my Dropbox folder in its index. When I search Spotlight (or use Alfred, which piggybacks on the Spotlight index), it won’t find any files or folders inside Dropbox. This is very frustrating, as I keep nearly every file there.

I’m running the latest High Sierra (no betas), and I’ve tried adding Dropbox to the Spotlight private folders list and removing it again. I’ve also tried running mdutil -i on / in Terminal. I’ve rebooted, and even reinstalled macOS on the recommendation of an Apple Support rep. Still nothing. This is only happening on my iMac, not my Macbook Pro. It’s completely baffling to me.

If anyone has any ideas on this, please let me know. I’m at wit’s end!

1 Like

Where is your Dropbox folder located?
(I.e. the path)

Just in the default location, ~/Dropbox.

It’s been working fine there for years, and continues to work fine there on my laptop. The whole thing is baffling.

Try resetting in system preferences > spotlight > privacy by adding the entire drive to not be indexed, close system prefs, then reopen again and remove the privacy-add.

Sometimes dumb little things like that work.

I’ve done this with the Dropbox folder, but not with the whole Macintosh HD volume. I’ll give it a shot.

By choosing and unchoosing the entire drive you force Spotlight to reindex entirely. Should do the equivalent of

sudo mdutil -i off /
sudo rm -rf /.Spotlight*
sudo mdutil -i on /
sudo mdutil -E /

1 – turn indexing off
2 – delete Spotlight folder
3 – turn indexing on
4 – rebuild

1 Like

Well now I’m completely lost. I did the Spotlight privacy dance and left things overnight to reindex. Now, I’m still not getting any results from ~/Dropbox, and I’m also getting nothing inside of ~/Documents or iCloud Drive. There are still a few mdworker processes running, but they’re all using <5% or so CPU. Most are using 0.0%.

That is weird. Did you restart?

At any rate, sounds like it may have stopped indexing, based on my own Mac, which always has mdworker processes going:

image

I’d recommend trying to clean up all caches, performing daily/weekly/monthly scripts, choosing to reindex again, then restarting. I use the free app Onyx for this to do it all at once.

image
image

I had this same issue over the weekend. Search wasn’t working on email either. I just did a restart and for some reason it fixed it.

Just a bit of follow-up™️ on this issue. I went many rounds with Apple support, to the point that I ended up with a dedicated second-level support rep who was a liaison with Engineering on the issue. After a couple of back-and-forths with Engineering, this was the solution.

I needed to delete some special cache files that weren’t getting deleted by the Spotlight Private Folder Dance :dancer: described above. They send this Terminal one-liner:

sudo find /var/folders -name "*.csstore" -delete; sudo reboot

After this, I did the Spotlight dance. Then, the indexing didn’t actually finish until a few hours after the progress bar said that it did. I’m now able to use all my favorite Alfred workflows for opening files and folders again.

2 Likes

I was hoping this would work… but delete operation not permitted in /var/folders/*on 10.13.6. I assume I need to disable SIP first, and ain’t nobody got time for that.

Yes. This was before /var got locked down in Catalina.