Why isn’t finder finding all files

filesystemfinder

I had a Smart Search for my Photo Stream files located at ~/Library/Application Support/iLifeAssetManagement/assets/sub/, searching for JPG and PNG files. I found that not all files were showing up. So I went looking for them myself and was able to locate them.

enter image description here

How does this make sense? Why doesn't finder see the same results? The list of files was achieved using the find command at the prompt. I then passed a simple find result to wc to get the count, 153 files found via find in Terminal but only 75 in Finder using Spotlight? What's the deal?

Best Answer

It might be necessary to rebuild the Spotlight database by running

sudo mdutil -E /

and waiting a few hours. I had the same issue in the past and rebuilding the index resolved it.