I'm trying to understand how Spotlight indexing works – in the documentation here, Apple says that the kernel notifies the Spotlight engine which then attempts to update the metadata store. If this is the case, why does it have to index – presumably it would be up to date if this already happens after every file event?
MacOS – When is the metadata store updated
macosmdsmetadataspotlight
Related Question
- MacOS – Spotlight borked after macOS Sierra update
- MacOS Sierra Spotlight search does not find Numbers but Number
- IOS – Cannot Sign In to enable iTunes & App Store within iOS Simulator
- MacOS – Finally reinstalled macOS Sierra, but now I get a kernel panic
- MacOS – Spotlight doesn’t show applications
- MacOS – Red dot showing in the software update icon but already updated
- MacOS mdfind/mdutil issue and updatedb command : how to index all the files on the /Volume (root /)
Best Answer
Initially, the indexers have to process the entire disk so there are hours (days) to take one pass to index all files.
Steady, state the kernel and system indexes all files as they are written so newly created files and files copied in are basically indexed real time.
You can see this in action by having spotlight in finder search a nonsense string that doesn’t exist. Then open text edit and past that string into a file and save it to your desktop - watching the finder window update to show that file.