spotlight cant find files but finder can?

ive always had a long standing issue with spotlight and i wanted to address it publicly.

quite often i open spotlight, type the name of a folder or file in and it cant find it.

i then have to go to finder and search for it where it locates it without an issue.

why is this?


ps. ive re-indexed, deleted finder & spotlight prefs etc etc but it still never properly works.

MacBook Pro 16″, macOS 12.6

Posted on Jul 11, 2023 12:59 PM

Reply

Similar questions

7 replies

Jul 11, 2023 01:15 PM in response to benjigordon

Finder uses Spotlight in a Finder Window, and from the Finder's Find window. If you are looking for content in a file where that content has white spaces in the string ,then use double-quotes. If you are looking for a file that has Dusty as part of the case-insensitive filename, then use the Spotlight keyword:


name:dusty



Apple discusses how to refine your Spotlight searches in Narrow your search results on Mac - Apple Support


Oct 12, 2023 10:16 PM in response to benjigordon

I've had this happening to me for months (possibly since one of the macOS Sonoma betas?)


Here's what fixed it for me:


  1. Perform Spotlight searches for files in my Home directory (no results)
  2. Create a new user account
  3. Log into the new user account
  4. Perform some Spotlight searches there (they work)
  5. Log out of the new user account and back into my normal account
  6. Delete the new user account(and its home folder)
  7. Perform Spotlight searches for files in my Home directory – it works!


I did also throw away the ~/Library/Metadata folder and the ~/Library/Caches/com.apple.Spotlight folders. I did put them back and it didn't seem to re-break Spotlight (so I don't think they were the problem) but I should probably mention it in case this was the fix.

Jul 11, 2023 02:26 PM in response to VikingOSX

thanks for this, i appreciate it.


i think this boils down to a fundamental need to re-build spotlight to make it easier for the user.

there shouldn't be such huge differences from searching in spotlight to finder.

the user shouldnt have to think about case sensitivity, white spaces, strings of words etc...


the point is that finder can find the files but spotlight cant.


seems like either im missing something here or that apple need to address this.



Oct 13, 2023 12:44 PM in response to benjigordon

Safe Boot, (holding Shift key down at startup), does the problem occur in Safe Mode? Could take 10 minutes.


Safe mode attempts to repair Disks & clears lots of caches & loads safe Drivers, & prevents loading of 3rd party extensions, so if Safe Mode works try again in regular boot.


Manually Rebuilding Spotlight via Terminal

If the aforementioned Spotlight control panel approach doesn’t spur a reindexation of the drive, you may need to initiate it manually through the command line. Open Terminal and use the following command string to do so:


sudo mdutil -E /

This basically asks for temporary super user status, which is why Terminal may ask you for your password (it may not if you’ve used a sudo command recently or are already logged in as a super user or root. The command asks the unix tool mdutil to reindex the spotlight database for everything on the computer, including external drives, mounted disk images, etc. To re-index only for a specific drive, use the /Volumes path. For example, for an external drive named “MiniMe,” the command would look like this:


sudo mdutil -i on /


Rebuilding a drive index can take a long time, so be prepared to wait whether you do it through the System Preference panel or the command line.


If still need be…


Open Terminal and run each of these one at a time


/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user


sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed -lint -r -f -v -dump -domain local -domain system -domain user -domain network


killall Dock


sudo mdutil -E /


sudo mdutil -i on /

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

spotlight cant find files but finder can?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.