MacOS – Disable Spotlight for Non-Current Boot Volume

macmacosspotlight

I'm fully aware of the ways in which to disable Spotlight for a volume (.metadata_never_index etc.) but this question is more specific. Let me give you a bit of background.

I have a Mid 2010 MacBook Pro 13" that I am using for development. I've bumped up the RAM and installed a 1TB HDD onto which I have installed OS X 10.6 – 10.11, each in its own partition. The reason for this is that I want to be able to test my code under each version of the OS to make sure it performs as expected. I'm not using virtualisation to test as the code needs to access the AirPort card.

The "problem" that I'm having is that when I use Spotlight, it brings up results from every partition, so if I'm trying to quickly launch a system app, Spotlight shows me 6 versions of the same app.

What I would like to do, if possible, is disable the index for any volume except the current boot volume (so if booted in to Mavericks, Spotlight ignores the volume index for the 10.6, 10.7, 10.8, 10.10 and 10.11 volumes) without destroying the non-boot volume indexes so they don't have to be rebuilt each time I boot to that volume.

Best Answer

I currently don't have a multi-boot system to try this on, but I would expect
System prefs > Spotlight > Privacy
on each OS to respect the setting if you dropped each of the other 5 partitions in there; effectively repeating the process for each of the 6 boot partitions as you boot from it.

enter image description here