In some cases, Spotlight’s indexing becomes a nuisance at best, and a problem at worst. A diagnostic OS can be used to repair or recover from a failing hard drive, for example, but Spotlight indexing can slow down the process (and lessen your chances of recovering data).
Luckily, it’s pretty simple to disable Spotlight. In the Terminal, run this command:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
If you later change your mind, this command will reverse it:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
Note that this disables Spotlight systemwide, not just on a per-HD basis. Existing Spotlight indexes will be left untouched.
It should be noted, in OS X 10.7 and above, the App Store uses Spotlight to recognize which apps are installed and can be updated. With Spotlight disabled, the App Store will only show OS updates. If you’re updating your Diagnostic OS, I’d suggest temporarily changing this setting.
Tested with: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9