Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

signer-ink-beast

macrumors newbie
Original poster
Mar 20, 2024
6
6
Sorry if this is the wrong forum to post this kind of question in. If it is better suited elsewhere, feel free to move it.

Hello, everyone! I have a question wrt Spotlight's settings. I actually triple boot 3 different versions of Mac OS on a 2010 unibody macbook: Snow Leopard, El Capitan, and High Sierra. They all work with no problems. This includes Spotlight. But I do notice something weird: if I change privacy settings in Spotlight in either El Capitan or High Sierra, they both actually share the same settings.

To illustrate, in El Capitan, if I set Spotlight to not index my SL and HS partitions, it works as I would expect.

But if I reboot into HS, I see Spotlight matches the same settings. So it won't search its own partition and only searches El Cap. If I tweak the settings so that it only searches for things on HS, it'll work as expected. But then if I reboot into El Cap, and try searching for things in Spotlight, it's the same deal. It'll not search its own partition and only search HS.

Not a deal breaker or even a big deal, but it is both annoying and strange. One would think that they would keep the settings separate. They are installed on their own partitions and have their own settings. Why would they share the same settings in this particular case? Very odd, IMO.

At least SL isn't in the mix with this problem. It keeps its settings and EC and HS ignore them.

Searching the internet, I saw one Reddit thread mention the same issue, but not much more than, "Hey, this happens. Any solution?"

I guess one to cope with this would be to let them index both partitions and deal with Spotlight's other quirks that come with that. I'll probably try to dig into it here and there to see if I can find anything. But I want to ask if anyone else has also seen this or found anything.
 

Dayo

macrumors 68020
Dec 21, 2018
2,208
1,257
Spotlight settings are generally global. When you use the Spotlight GUI, it basically runs a "sudo defaults do_xyz" command that typically uses "NSGlobalDomain" since a domain is not specified.

So, when you set "Do Not Scan Location ABC", the Mac OS instance you are booted into at the time is irrelevant and what you are setting is basically "Never Scan Location ABC on This Mac".

To make your instructions only apply locally, use the Spotlight GUI to delete the current global exclusions and then manually apply local exclusions for each Mac OS volume instead.

To manually apply local exclusions, you will need to edit the Spotlight config files for the volumes via Terminal while using "sudo" for elevated permissions. So, for each volume, open the "/.Spotlight-V100/VolumeConfiguration.plist" file and add the paths to the volumes you want to exclude from Spotlight to the "Exclusions" key.

You can use "PlistBuddy" for the edits but direct edits using your fav Terminal editor also work.
Example: sudo nano /.Spotlight-V100/VolumeConfiguration.plist.

For example, in Volume_A...
XML:
<key>Exclusions</key>
<array>
    <string>/Volumes/Volume_B</string>
    <string>/Volumes/Volume_C</string>
    <string>/Volumes/Volume_D</string>
</array>

Volume_B...
XML:
<key>Exclusions</key>
<array>
    <string>/Volumes/Volume_A</string>
    <string>/Volumes/Volume_C</string>
    <string>/Volumes/Volume_D</string>
</array>

Volume_C...
XML:
<key>Exclusions</key>
<array>
    <string>/Volumes/Volume_A</string>
    <string>/Volumes/Volume_B</string>
    <string>/Volumes/Volume_D</string>
</array>

Volume_D...
XML:
<key>Exclusions</key>
<array>
    <string>/Volumes/Volume_A</string>
    <string>/Volumes/Volume_B</string>
    <string>/Volumes/Volume_C</string>
</array>

When done with a volume, reset Spotlight with sudo mdutil -E /.
 
Last edited:

signer-ink-beast

macrumors newbie
Original poster
Mar 20, 2024
6
6
Spotlight settings are generally global. When you use the Spotlight GUI, it basically runs a "sudo defaults do xyz" command that typically uses "NSGlobalDomain" since a domain is not specified.

So, when you set "Do Not Scan Location ABC", the Mac OS instance you are booted into at the time is irrelevant and what you are setting is basically "Never Scan Location ABC on This Mac".

To make your instructions only apply locally, you will need to delete the global exclusions you set via the Spotlight GUI and manually apply local exclusions for each Mac OS volume instead.

You will need to access the Spotlight config files for the volumes via Terminal and use "sudo" for elevated permissions. So, for each volume, assuming you are at the volume root in Terminal, open the "/.Spotlight-V100/VolumeConfiguration.plist" file and add the paths to the volumes you want to exclude from Spotlight to the "Exclusions" key.

You can use "PlistBuddy" for the edits but direct edits using your fav Terminal editor also work.
Example: sudo nano /.Spotlight-V100/VolumeConfiguration.plist.

For example, in Volume_A...
XML:
<key>Exclusions</key>
<array>
    <string>/Volumes/Volume_B</string>
    <string>/Volumes/Volume_C</string>
    <string>/Volumes/Volume_D</string>
</array>

Volume_B...
XML:
<key>Exclusions</key>
<array>
    <string>/Volumes/Volume_A</string>
    <string>/Volumes/Volume_C</string>
    <string>/Volumes/Volume_D</string>
</array>

Volume_C...
XML:
<key>Exclusions</key>
<array>
    <string>/Volumes/Volume_A</string>
    <string>/Volumes/Volume_B</string>
    <string>/Volumes/Volume_D</string>
</array>

Volume_D...
XML:
<key>Exclusions</key>
<array>
    <string>/Volumes/Volume_A</string>
    <string>/Volumes/Volume_B</string>
    <string>/Volumes/Volume_C</string>
</array>

When done with a volume, reset Spotlight with sudo mdutil -E /.
Thanks, @Dayo! I can confirm this works. All my Mac OS installations search their own volumes after putting the exclusions in place on each Mac OS volume manually.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.