Sub topic 5
Finding Files by Name and Content
This chapter assumes you can open Spotlight with Command-Space, and that you know where your documents and downloads usually live. It covers how Spotlight matches file names and file contents, how to read the results, and the common reasons a search misses a file.
How Spotlight matches files
Spotlight searches two things at once:
- Names. It matches the file name, including parts of a name. Typing
invoicefindsInvoice March.pdfand2026-invoice-final.docx. - Contents. It also matches text inside documents, such as PDFs, Word files, Pages documents, notes, and emails. A file can appear even when its name has nothing to do with your words.
Matching is not case-sensitive. Spotlight also ranks results, so files you open often, and files whose names match closely, tend to appear nearer the top.
Spotlight does not scan your disk when you type. It looks up your words in an index that macOS builds in advance. That is why results appear almost instantly. A later chapter covers the index in detail.
Searching by name
Press Command-Space and type part of the file name. Use words you are sure of and add more words if there are too many results.
- Type
budget. Many files may match. - Add a second word:
budget 2026. Spotlight now looks for files that match both words. - Look under the Documents or PDF Documents headings in the results list.
Each result shows an icon and a name. If two results have the same name, select one and check its preview to tell them apart.
Searching by content
To find a file when you only remember something it says, type a distinctive word or phrase from the text.
"quarterly report"
refund policyThe first line, in quotation marks, looks for those words together and in order. The second looks for both words, in any order and any place in the file. Prefer rare words. A search for the is useless, while Hartwell may find the one contract that mentions that name.
Content matching works only for file types Spotlight can read. Plain text, PDFs with real text, and common office formats work. A scanned PDF that is only a picture of a page has no text to index, so searching for words on it finds nothing.
Reading and checking a result
Select a result with the arrow keys and Spotlight shows a preview on the right. Use the preview to confirm it is the right file before you open it.
| Action | Keys |
|---|---|
| Open the selected file | Return |
| Show the file in Finder | Command-Return |
| Move down or up the list | Down or Up arrow |
Command-Return is useful when you found a file but need to know where it is stored. Finder opens the containing folder with the file selected.
Common errors
- A file you just saved is missing. The index may not have caught up yet. Wait a moment and search again.
- A file in a certain folder never appears. The folder may be excluded in Spotlight settings, or it may sit on a drive that is not indexed.
- Content search finds nothing in a PDF. The PDF is probably a scan without text.
- Too many results. Add a rarer word, use quotes for an exact phrase, or narrow by kind. The next chapters cover both.
Exercise
You remember that a contract mentions the name "Hartwell", but you don't remember its file name. It is stored as a scanned PDF (a photo of each page). Will searching for Hartwell in Spotlight find it, and why or why not?
Show answer
Probably not. Spotlight matches content only when the file contains real text. A scanned PDF holds only images of pages, so the word is not in the index unless the PDF has a text layer from character recognition. Search by the file name or date instead, or run character recognition on the scan.
Exercise
You found a file in the Spotlight results and want to see which folder holds it. Which key combination do you use?
Show answer
Select the result and press Command-Return. Finder opens the containing folder with the file selected.