Spotlight Disable Indexing
The previous tip covered the way Spotlight works. A very little documented feature of Spotlight, but one that can be very useful, is the possibility to disable indexing for specific sensitive folders. By default, indexing will be performed immediately after file notifications are received by the
- GUI - Using the interface, got to System Preferences → Spotlight → Privacy and add your desired folder to the list:
- Manual - Previously, you could create a file named
.metadata_never_indexin the folder you wanted to prevent indexing, but currently this trick no longer works. However, the following works fine with macOS Sierra to prevent a specific folder or file from being indexed by Spotlight. Simply add a “.noindex” extension and the folder will be removed from the database and not indexed in the future.
Note: The manual method works only with folders and files, not with whole drives.