Mac OS X,  Xsan

Mac OS X: Enable and Disable Spotlight

To Disable Spotlight for Mac OS X you can stop the Spotlight processes from being invoked by launchd.  To do so use the following commands:

launchctl unload -w /System/Library/LaunchAgents/com.apple.Spotlight.plist

launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

To re-enable it you would simply load up your launchd processes again like so:

launchctl load -w /System/Library/LaunchAgents/com.apple.Spotlight.plist

launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist