Spotlight in Finder window isn't finding files in the current folder

I have a MacBook Pro M2 with Ventura 13.4.1, and I started this machine from a Time Machine migration of my previous Mac. I notice that when I use Spotlight from a Finder window to search for a file, it will find the file in "This Mac" but if I switch to the current folder (selecting the name of the folder which is shown next to the "This Mac" option), the result is always empty even if the file is definitely there (and shown in the list with the "This Mac" scenario). I saw a similar issue reported at Spotlight search does not return results … - Apple Community but none of the proposed solutions there helped. I don't think this can be an indexing issue since Spotlight is quite successful at finding the files quickly when I'm searching the whole system.


MacBook Pro 16″, macOS 13.4

Posted on Jun 28, 2023 1:48 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 28, 2023 9:39 AM

So after a phone call with Apple, the solution was to rebuild the index by dragging the entire mac HD volume into the 'Prevent search' locations box, hitting 'Done', and then going in a removing it again (with the - button). Although I had tried this earlier with a single test folder (and it didn't work), the rebuild of the whole index does appear to have resolved the issue.

Similar questions

18 replies
Question marked as Top-ranking reply

Jun 28, 2023 9:39 AM in response to VikingOSX

So after a phone call with Apple, the solution was to rebuild the index by dragging the entire mac HD volume into the 'Prevent search' locations box, hitting 'Done', and then going in a removing it again (with the - button). Although I had tried this earlier with a single test folder (and it didn't work), the rebuild of the whole index does appear to have resolved the issue.

Jun 28, 2023 8:13 AM in response to jquartel

I was able to solve this in my M1 Max too.

As I suspected, it required going into Recovery.


0) Make sure you have a BACKUP!

1) Shutdown

2) Start in Recovery: press and hold the power button until you see a screen with your drive, and a button labeled "Options"; click "Options".

3) From the Utilities menu, select Terminal

4) Type the following command EXACTLY - you've been warned! A mistake could end in lost data!

Don't do this without a BACKUP!


rm -R /Volumes/Data/.Spotlight-V100


5) Quit Terminal and restart your mac normally.


Jun 28, 2023 1:51 AM in response to jquartel

If Spotlight in the Finder window is not finding files in the current folder, there are a few troubleshooting steps you can try:

  1. Check Spotlight settings: First, verify that Spotlight is set to search within the current folder. Open a Finder window and navigate to the folder where you want to search. Click on the Spotlight icon (magnifying glass) in the top-right corner of the Finder window. In the Spotlight search bar that appears, click on "Show All" to reveal the search options. Make sure "In This Mac" is selected, indicating that it will search within the current folder.
  2. Rebuild Spotlight index: If the issue persists, it might be helpful to rebuild the Spotlight index on your Mac. This process can resolve any indexing errors and ensure that files are properly searchable. Here's how to do it:
  3. a. Go to "System Preferences" from the Apple menu ().
  4. b. Click on "Spotlight."
  5. c. Switch to the "Privacy" tab.
  6. d. Drag the folder(s) or disk(s) where you're experiencing the issue into the Privacy list.
  7. e. Click the "-" button to remove them from the list.
  8. f. Close the Spotlight preferences window.
  9. g. Wait for a few minutes to let Spotlight re-index the selected folder(s) or disk(s).
  10. h. Afterward, you can remove them from the Privacy list by selecting them and clicking the "-" button again.
  11. i. Spotlight will start indexing the folder(s) or disk(s) again, and you should try searching within the current folder to see if it's working correctly.
  12. Check for Spotlight exclusions: It's possible that the current folder or its contents are excluded from Spotlight search. To verify this, go to "System Preferences" > "Spotlight" > "Privacy" tab. Ensure that the folder or disk containing the files you want to search is not listed in the Privacy list. If it is, remove it by selecting it and clicking the "-" button.
  13. Reset Spotlight preferences: If none of the above solutions work, you can try resetting Spotlight preferences. Note that this will reset all your Spotlight settings to their default state. Here's how to do it:
  14. a. Open the Terminal application (located in Applications > Utilities).
  15. b. Enter the following command and press Enter: sudo mdutil -E /
  16. c. You will be prompted to enter your administrator password. Type it in (you won't see it as you type) and press Enter.
  17. d. Wait for Spotlight to re-index your Mac, which may take some time.
  18. e. After the process completes, try searching within the current folder in the Finder window.

If the issue persists after trying these steps, you may want to consider contacting Apple Support for further assistance. They can provide additional troubleshooting guidance specific to your macOS version and configuration.




Dec 7, 2023 5:17 PM in response to jquartel

I had the same issue: neither Finder nor Spotlight were finding any files on my Macintosh HD. I tried the steps you mentioned to re-index but it didn't kick off the indexing process. So I added a step (in italics) to yours, which worked to rebuild the index, which in turn solved the problem:


Rebuild the index by dragging the entire mac HD volume into the 'Prevent search' locations box, hitting 'Done', restarting the Mac, and then going in a removing it again (with the - button).

Jun 28, 2023 2:53 AM in response to jquartel

In Finder Settings > Advanced, have this set:



and try the following to locate a specific plain text file with the case-insensitive name string "foobar" in the filename.


kind:plain name:foobar



This directs Spotlight to cut to the focused chase and not attempt to visit every Spotlight search result category (including inside documents) that are not relevant.


See: Narrow your search results on Mac - Apple Support


Jun 28, 2023 2:45 AM in response to jquartel

This is a known problem affecting a number of people.

I have experienced in both my macs (one intel, one M1 Max).


On my intel mac, I could solve it without restarting, by deleting a Spotlight-v100 folder in Terminal.


sudo rm -r /System/Volumes/Data/.Spotlight-V100


This did not work in my M1 Max.

It will probably have to be done by restarting in Recovery and the process is more delicate. I have not tried that yet, partly because I access that mac remotely most of the time.

Jun 28, 2023 2:14 AM in response to MyMacComputr

Thanks yes I did try all of these but none helped. In your step 1, "In the Spotlight search bar that appears, click on "Show All" to reveal the search options" I do not see any "Show All" in the search bar. This is true for my other Mac (with the same OS and not having this issue), so I think this advice might be relevant for an earlier OS version.


Incidentally, running the mduitl command just returned immediately with

/:

Indexing enabled. 

so I'm not sure if it's complete of I still need to wait "some time" before I check that it's working again.


Also, I think you should not be referring to "Spotlight" in System Preferences since this no longer exists. It's now "Siri and Spotlight" and there is no "Privacy" tab (you have to click on the "Spotlight Privacy..." button at the bottom to get to these settings).

May 7, 2024 8:30 AM in response to jquartel

Having spent hours with Apple support, and trying every kind of reset they suggested, and paying a local Mac guy, nothing worked until, with great trepidation, I tried jquartel's suggestion. I followed the steps on a Friday, didn't open my laptop again until Sunday, and it wasn't fixed. But, on Monday it was fixed!!!!! So "a long time" is certainly correct.

Thank you thank you thank you,

Cheers, CMY

MacBook Air M1 2020 (new June 7, 2023)

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 in Finder window isn't finding files in the current folder

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