Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Index only certain directories in Spotlight System
Since (apparently) later versions of 10.5, Spotlight has a file called VolumeConfig.plist which you can edit to index only certain directories. For example, I wanted to index only my Mail folder and my Documents folder because those don't usually have radical changes, and they're the only places I ever need search (especially Mail). To accomplish this, I first disabled Spotlight indexing on my hard disk:
sudo mdutil -i off /
Then, with root permissions, I opened /.Spotlight-V100/Store-V1/VolumeConfig.plist and edited it. I changed partialPath to Users/myusername/Library/Mail (note the lack of a leading slash), and policySearch to 3.

You can also copy the whole block describing the index (it has a long UUID string for its key, and then the dictionary that goes with it describes partialPath and policySearch), and change the UUID (use uuidgen in Terminal) to add additional paths that you want indexed. When you're done, save changes to the file, then restart mds:
sudo launchctl stop
Now that you've set up the new indexes, you should be able to control them using mdutil:
mdutil -sv ~/Library/Mail
Use caution however, as you may undo your work if you run mdutil -i on /.

[robg adds: I haven't tested this one.]
  • Currently 2.36 / 5
  You rated: 3 / 5 (14 votes cast)

Index only certain directories in Spotlight | 1 comments | Create New Account
Click here to return to the 'Index only certain directories in Spotlight' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Index only certain directories in Spotlight
Authored by: cousincocaine on Oct 02, '09 10:54:21AM

Probably this works like a charm for local drives
But i still can't figure out how to index mounted airport drives.

[ Reply to This | # ]