Changes to Spotlight indexes were introduced in macOS Tahoe 26.6, where Apple remarked that update “optimizes the Spotlight index in preparation for macOS 27”, without giving further information. Golden Gate 27.0 also fixed longstanding bugs in the indexing of some plain text files. This article provides insight into how indexing now occurs, using the test files provided in my free diagnostic utility SpotTest in Golden Gate 27.0.1.
Test
As part of its testing of Spotlight search, SpotTest creates a folder at the top of your Home folder containing files it copies from inside its app bundle. These include:
- A: plain text, whose content should be indexed,
- B: Rich Text, whose content should be indexed,
- C: PDF, whose text content should be indexed,
- D: HTML, whose content should be indexed,
- E: DOCX, whose content should be indexed,
- F: Numbers, whose content should be indexed,
- G: Pages, whose content should be indexed,
- H: PNG image, which should have content recognised by Visual Look Up, but doesn’t undergo early content indexing,
- I: PNG image, which should have words extracted by Live Text, but has previously been indexed later,
- K: JPEG image, whose embedded EXIF metadata contains a Make tag of cattle
- L: XML Property List, whose content includes the word cattle
- M: plain text, with a Keywords extended attribute containing cattle
- N: PDF, whose text content should be indexed.
There are thus three image files, and two PDFs likely to need the attention of specialist processing by mediaanalysisd and CGPDFService, while the other eight files should only require processing by mdworker processes using their mdimporter plugins.
Log observations
In the log extract obtained from a Mac mini M4 Pro running macOS 27.0.1, copying of test files was triggered at 0.693 seconds, and creation of the test folder was notified as a series of FSEvents at 1.161 seconds.
mdimporters
mdworker processes were launched to start indexing the files’ contents between 1.906-1.935 seconds, and those mdworkers were all running by 1.993. A total of 13 mdworkers were launched, one for each new test file. As those normally complete their indexing silently, completion times aren’t recorded clearly in the log.
PDF text extraction
The first record of a call for CGPDFService to extract text contents of a PDF file was invoked at 2.351 seconds, and it was running at 2.377. That service was active between 2.542-2.572 seconds, following which no further activity for it was recorded in the log.
Text extraction from images
mediaanalysisd (MAD) started running its first text recognition task at 2.397 seconds, at a Quality of Service of 9 (Background), a low priority that should have run it on the E cores. It was then run in seven distinct and non-overlapping sessions for text recognition on images:
- ID 658 between 2.397-3.354 seconds, failed to generate any text
- 659 between 3.366-4.274, generated 2 text embeddings
- 660 between 4.285-5.192, generated 2 text embeddings
- 661 between 5.203-6.120, generated 2 text embeddings
- 662 between 6.130-6.590, generated 1 text embedding
- 663 between 6.593-7.044, generated 1 text embedding
- 664 between 7.055-7.967, generated 2 text embeddings.
This yielded a total of 10 text embeddings for the three image files included in this test.
Indexing
Shortly after the start of the last of those, from 7.066 seconds, mds_stores reported compressing indexed data from then until 7.974 seconds. Following that, all Spotlight indexing activity fell quiet.
Sequence and timings
In this test, indexing files using mdimporter plugins was started less than 0.8 seconds after the creation of the new files was notified in FSEvents. Each new file was assigned its own mdworker process to perform that.
Extracting text contents from PDF files by CGPDFService started later, about 1.2 seconds after FSEvents. That was active for a period of 0.03 seconds before completion.
Text extraction by mediaanalysisd started at about the same time as CGPDFService, and consisted of seven non-overlapping rounds generating 0-2 text embeddings each. Five of the rounds took about 0.9 seconds each, and two only half that. These were run at a low Quality of Service of 9, and would typically be run on E cores.
Final compression of indexed data was completed about 6.8 seconds after the first FSEvents notification. For these relatively small files, Spotlight indexing is both prompt and rapid, and similar to that in macOS 15.6.
When indexing doesn’t appear to be performed correctly, for example when using SpotTest to diagnose Spotlight problems, identifying log entries corresponding to the phases described here could aid diagnosis.
Appendix: Log waypoints
The following are typical entries marking each phase described above, to assist when reading the log.
FSEvents:
01.160999 com.apple.fsevents.matching Received FSEvent about /Applications/SpotTest.app/Contents/Resources/SpotTestA.txt
mdworker:
01.906304 user/501/com.apple.mdworker.shared.20000000-0200-0000-0000-000000000000 internal event: WILL_SPAWN, code = 0
CGPDFService:
02.350612 pid/23748 [mdworker_shared] Service stub initialized for com.apple.CoreGraphics.CGPDFService
02.567277 CGPDFService Out of bounds page index
mediaanalysisd:
03.364615 spotlightknowledged.importer [MADService] Submitting text processing request [ID: 659 QoS: Background]
04.274055 spotlightknowledged.importer [MADService] Text processing request completed [ID: 659]
04.274080 com.apple.spotlightembedding Successfully generated 2 text embeddings (time=21827765ns), requestID: 659
mds_stores:
07.065801 mds_stores compressing 51 bytes to [private]

