Content search

Search inside files (Spotlight index or lightweight text scan) and understand limitations.

Content search (search inside files)

Explorer can search not only by filename, but also inside file contents.

What content search is good for

  • finding a function name in a project folder
  • locating a config value you remember (“baseUrl”, “token”, “localhost”)
  • searching notes and text exports without opening an editor

Turn it on (and where it lives)

Open Preferences → Search:

  • Search file contents (badge: Slower)

Also make sure you’re happy with:

  • Search scope (Current folder vs Subfolders)
  • Use Spotlight
  • Maximum results

Preferences overview: Preferences

How it works

Content search is intentionally conservative so search stays responsive.

If “Use Spotlight” is enabled

Explorer asks Spotlight for results inside your current base folder.

With content search enabled, the query includes:

  • file names
  • Spotlight’s indexed text content (when available)

This is the fastest mode for large folders, as long as Spotlight indexing is healthy.

If “Use Spotlight” is disabled

Explorer falls back to a file system scan.

In this mode, content search:

  • checks file names first (fast)
  • if needed, reads small text files and searches their decoded text

What it searches (and what it won’t)

To keep search fast and safe, Explorer applies real limits:

  • Directories are skipped (only files match by content).
  • Only text‑like files are searched by content (based on macOS file type).
  • Large files are skipped for content scanning (roughly over 1 MB).
  • Content decoding focuses on common encodings (UTF‑8/UTF‑16/Latin‑1).

Content search is not a full code indexer. It’s meant for “find the thing” workflows.

Hidden files and system locations

Hidden items (dotfiles like .env, .gitignore) may be filtered out unless you enable:

  • Include hidden files (Preferences → Search), or
  • Show hidden files (Preferences → View)

Hidden & system files: Hidden & system files

Tips that actually help

  • Search for a distinctive token (API_BASE_URL) instead of a full sentence.
  • If results feel noisy, switch scope to Current folder first: Search scope
  • If search feels slow, lower Maximum results or turn off content search for that session.

Expectation setting

Content search is a practical “find the thing” tool - it’s not meant to replace a full code indexer.

Troubleshooting

If content search returns nothing:

  1. Confirm Search file contents is enabled (Preferences → Search).
  2. Confirm Use Spotlight is enabled, then try again.
  3. If Spotlight is enabled but results are incomplete, check Spotlight indexing and Spotlight Privacy exclusions.
  4. If Spotlight is disabled: the file may be too large, not text‑like, or not readable due to permissions.

Next steps