File search not working: what to check, in order

When file search stops returning a file that is plainly on the disk, the fix is almost never a full rebuild of the search index. On a Mac, work through five checks in this order: the scope the search window is using, the categories Spotlight is allowed to show, the list of places Spotlight is told to ignore, whether indexing is still running, and only then a targeted reindex of the one folder or disk that misbehaves. The first three take under a minute each. The last two take longer, and Apple now documents a way to rebuild part of the index instead of all of it. If the machine in front of you runs Windows, the order is different and is covered in its own section near the end.

Everything below was checked against Apple's and Microsoft's support pages as they stood on 9 October 2026.

Name the symptom before touching a setting

"Search is broken" describes at least four different faults, and each one points at a different layer. Ten seconds spent naming the symptom saves an afternoon of reindexing something that was never the problem.

What happens Most likely layer First check
Finder search finds nothing, but the file is visible when the folder is opened Search scope or exclusion list Scope bar, then Search Privacy
Spotlight (Command-Space) finds apps but no documents Result categories turned off Spotlight settings
Old files are found, files from today are not Indexing still running or stalled Indexing status
Files on one external or network drive never appear That volume is not indexed Search Privacy, volume status
Everything was fine until a macOS update Index being rebuilt after the update Wait, then check status

The last row matters more than it looks. Apple's own page on the index says indexing happens when the device is first set up, after a software update or upgrade, and as data changes. So the week after an update is exactly when search looks broken while the Mac is simply busy. The same page adds that, depending on how much data is on the device, indexing "can take hours or even days," and that it finishes faster when the Mac is idle, on power, and on Wi-Fi or Ethernet (Apple: About Spotlight indexing and search results).

If the symptom fits the last row, the right move is to plug the Mac in, leave it alone overnight, and look again in the morning. Nothing else on this page will beat that.

Check what the Finder is actually searching

The most common reason a Finder search returns nothing has nothing to do with the index. It is the scope.

When a search term is typed into a Finder window, a scope bar appears under the toolbar. One button searches the whole Mac. The other carries the name of the folder that was open when the search started. Whichever button is highlighted is the one in effect. The default is set in Finder Settings, under Advanced, by the option for what to search when performing a search. A search that starts inside Downloads and stays scoped to Downloads will never find a file in Documents, and nothing on screen says so loudly.

Three quick checks:

  1. Scope. Click the button for the whole Mac and run the search again. If the file appears, the index is fine and the problem was the scope.
  2. Name or contents. As a term is typed, the Finder offers suggestions such as matching the name only. A search that matches contents will surface many more files, and one that matches names will miss a file whose name does not contain the term. Pick the one that matches what is known about the file.
  3. Kind filters left over. If a previous search added a rule such as Kind is PDF, the rule bar stays visible under the scope bar. Remove the rule with the minus button.

The Finder also lets a search be saved as a Smart Folder, so a query that works can be rerun later without retyping its rules. Apple's guide walks through File > New Smart Folder, the rule bar, and saving the result to the sidebar (Apple: Create or change a Smart Folder). It is worth doing for any search that is run weekly, because a saved search will not inherit the wrong scope by accident.

Check what Spotlight is allowed to show

Spotlight and the Finder share one index, but Spotlight shows only the categories it is allowed to show. A Mac that finds apps but not documents through Command-Space usually has the documents category switched off.

Apple's instruction for unexpected results is to open System Settings, click Spotlight (named Siri & Spotlight on some versions) in the sidebar, and review which kinds of content are turned on. Apple lists this check right after installing pending software updates, and before any reindexing.

The next stop is the exclusion list in the same pane. Apple's guide describes it as Search Privacy, reached with a button in the lower right of the Spotlight settings (Apple: Prevent Spotlight searches in specific folders or disks). Anything in that list is invisible to both Spotlight and Finder search. Folders end up there in ordinary ways: a backup tool adds its own cache, someone excludes a large project folder to stop the fans, or a previous round of troubleshooting was started and never undone.

Two details from Apple's page are easy to miss:

  • Excluding a Time Machine backup disk does not stop the Mac from indexing it, because Time Machine needs that index to work. Spotlight still leaves out items on the backup disk that are not part of a backup.
  • Excluding certain folders can stop update notifications for some apps, and excluding the entire internal disk stops all update notifications. That is a reason to keep the list short and to remove entries once a problem is solved.

If the missing file lives inside a folder on that list, removing the folder from the list is the whole fix. Spotlight will index it again on its own.

Find out whether indexing is running, stalled, or off

When scope and settings are clean and recent files are still missing, the next question is whether the index is being built at all.

The quickest visible signal comes from Apple: while indexing is in progress, a progress indicator appears at the top of the Spotlight window that opens with Command-Space. If that indicator is there, the index is working, and the right response is patience.

For a firmer answer, the Terminal has a status command that ships with macOS:

mdutil -s /

It prints the indexing status for the named volume. "Indexing enabled." is the healthy answer. "Indexing disabled." means no amount of waiting will help, because the volume has been switched off. For an external drive, replace the slash with the drive's path under /Volumes, for example mdutil -s /Volumes/Archive.

The manual page for mdutil (type man mdutil in the Terminal) lists the other switches. The ones that matter here:

Switch What it does When to use it
-s Shows the indexing status of the volume Always first
-i on Turns indexing on for the volume When status says disabled
-E Erases the local index so it is rebuilt Last resort for a whole volume
-a Applies the command to all volumes Rarely; it touches everything

Turning indexing on, or erasing a volume's index, needs administrator rights, so those forms start with sudo. An erase on a full internal disk sends the Mac back to the hours-or-days rebuild that Apple describes, so it belongs at the very end of the list, not the start.

Network shares behave differently. The Mac keeps a local cache of the index for some network devices, which mdutil -p can flush, but many file servers are never indexed from the Mac side at all. When the missing file is on a NAS or a mounted share, test with a search that does not use the index, described two sections below, before blaming Spotlight.

Rebuild only the part that is broken

Older advice says to rebuild the entire index whenever search misbehaves. Apple's current support page, published 25 August 2026, describes something narrower: on a Mac, rebuilding part of the index can resolve stubborn problems affecting certain files within a disk or folder. The steps, using Apple's screen names:

  1. From the Apple menu, choose System Settings, then click Spotlight (or Siri & Spotlight) in the sidebar.
  2. Scroll down and click Search Privacy (or Spotlight Privacy) at the bottom of the window.
  3. Drag the disk or folder that should be indexed again into the list, or click the add button and choose it.
  4. Wait a few seconds.
  5. Select the same disk or folder in the list and click the remove button.
  6. Click Done and quit System Settings. Spotlight now reindexes the contents of that disk or folder.

The trick is that adding a location to the exclusion list throws its index away, and removing it tells Spotlight to build it fresh. Doing this for one project folder takes minutes. Doing it for Macintosh HD takes as long as a full rebuild, so pick the smallest location that contains the missing files.

Apple also notes a failure case: if an "unknown" error or a permissions error appears while adding the location, the current account may not own some items inside it. Fixing ownership on that folder comes before trying the reindex again. This error is a useful clue in itself, because a folder the account cannot fully read is also a folder search may never have been able to index properly.

Search without the index while it rebuilds

A broken index should not stop work. Several ways of finding files do not depend on it, and they double as a test: if a search that skips the index finds the file instantly, the file exists and the fault is purely in the index.

find in the Terminal. It walks the folder tree one entry at a time, so it is slower on large trees but cannot be fooled by a stale index:

find ~/Documents -iname "*invoice*"

The -iname switch ignores case. Limiting the starting folder keeps it fast.

mdfind with a scope. This queries the Spotlight index from the Terminal, which is useful for confirming what the index knows. mdfind -onlyin ~/Documents -name invoice searches names inside one folder. If find sees the file and mdfind does not, the index is the problem, confirmed.

A file manager with its own search engine. Some Finder alternatives include a search that scans the folder directly. ForkLift's manual, for example, describes two engines: its own search, which checks files one by one in the current location and also works on remote connections, and Spotlight search, which is almost instant but only works locally (BinaryNights: ForkLift 4 manual). Having both side by side makes the diagnosis above a two-click job. A summary of how several file managers handle this sits on the comparison page.

The useful habit is to run the slow, index-free search inside the folder where the file is expected. When the folder already has a terminal attached, that means one command typed in place instead of opening a new window and changing directories.

If this is a Windows PC

Most results for this search describe Windows File Explorer, and the order of checks there is not the same as on a Mac. Microsoft's troubleshooting article for Windows Search lists six solutions in sequence: restart the Windows Font Cache Service, check for updates, run the Search and Indexing troubleshooter, restart Windows Search, reset Windows Search, and regenerate the Microsoft.Windows.Search package AppData folder (Microsoft Learn: Fix problems in Windows Search).

The logic carries over even though the names differ. Restart the service before resetting it, reset it before regenerating anything, and confirm with a search that does not rely on the index. The same caution about scope also applies: File Explorer searches the folder that is open, so a search started in the wrong folder returns nothing without any error.

What to change first

Start with the scope bar and the Search Privacy list, because those two account for most cases and cost nothing. If recent files are still missing, run mdutil -s /, then reindex only the folder that holds them using Apple's add-and-remove method. To keep a saved search and a terminal in the same window as the folder being searched, Atriens is free on the Mac with no time limit, and its FAQ covers what it does and does not do.

Frequently asked questions

How long does Spotlight take to rebuild its index on a Mac?

Apple says indexing can take hours or even days, depending on how much data is on the device. It finishes faster when the Mac is not in use, is connected to power, and is online. Reindexing a single folder through Search Privacy is much quicker than rebuilding the whole disk.

Why does Finder search find a file by name but not by its contents?

Content matching depends on the index having read the file, which takes longer than recording its name. Right after an update or a large copy, names may be searchable before contents are. Check that indexing has finished, and make sure the search is set to match contents rather than names only.

Is it safe to run sudo mdutil -E on my Mac?

It erases the index for the volume so it is rebuilt, and it does not delete any files. The cost is time: search will be incomplete until the rebuild ends, which can take hours. Try the partial reindex through Search Privacy first, and keep the erase for a volume that is still wrong afterwards.

Why can't Spotlight find files on my NAS or network drive?

Many file servers are not indexed from the Mac side, so Spotlight has nothing to search. Use a search that scans the folder directly, such as find in the Terminal or a file manager with its own search engine. If the server provides its own search service, that is the faster route.

Should I exclude large folders from Spotlight to speed up my Mac?

It can reduce indexing work, but anything excluded disappears from Finder search as well. Apple also warns that excluding certain folders can stop update notifications for some apps. Exclude only folders that never need to be searched, and remove the exclusion once a temporary problem is over.

Back to all posts