The Index: What It Is and Why It Exists

Searching a hard drive or SSD by reading every file in sequence would be unbearably slow. Spotlight solves this by building and maintaining an index — a pre-computed database of metadata and content that can be queried in milliseconds.

The index lives in a hidden folder called .Spotlight-V100 at the root of each indexed volume. This is why Spotlight results appear almost instantly: it's querying a database, not reading files.

The mds Daemon

mds (Metadata Server) is the background process that owns the Spotlight index. It runs continuously and is responsible for:

You can see mds in Activity Monitor. It normally uses minimal CPU. Sustained high CPU from mds usually means an active index rebuild is underway.

mdimporter Plugins

mds doesn't know how to extract content from every file format itself — that's done by mdimporter plugins. Each plugin is a small bundle that teaches mds how to read a specific file type and what metadata attributes to extract.

macOS ships with mdimporters for common formats: PDF, Word, Excel, JPEG, MP3, AAC, QuickTime, and many others. Third-party apps can install their own. Sketch, Final Cut Pro, Adobe apps, and most professional tools provide mdimporters so their files appear fully in Spotlight results.

If a file type has no mdimporter, Spotlight can still find it by name — it just won't index the content. This is why you can search for a .py file by name but not always search for text inside it.

What Spotlight Indexes

The index captures several layers of information:

All of these attributes are stored as kMDItem* attributes in the index (for example, kMDItemFSName for file name, kMDItemGPSLatitude for photo latitude). Tools like mdfind and HoudahSpot query these attributes directly.

What Spotlight Does Not Index by Default

Understanding what's excluded is just as important as knowing what's included:

Finder Search vs. the Spotlight Window

Both query the same index, but present results differently:

Neither interface exposes the full depth of the index. Spotlight filters for a clean, general-purpose result set. Finder is designed for browsing rather than deep query building.

How Query Tools Use the Index

Any app can query the Spotlight index using Apple's MDQuery API or the mdfind command-line tool. This includes:

Because they all read the same index, the data available to any of them is identical. What differs is how much of it each tool exposes in its UI, and how queries are constructed.

Try it yourself

Run mdfind -name "invoice" in Terminal to see what the raw Spotlight index returns for a name search. This is exactly what HoudahSpot queries under the hood — but with metadata attributes and location filters layered on top.

For more on how HoudahSpot specifically extends Spotlight's capabilities, see HoudahSpot and Spotlight: Better Together. If Spotlight is failing to find files you know exist, see Why Spotlight Can't Find Your Files.