You can try to temporarily disable Spotlight, removing its files and then reenabling it.
The process to do this involves executing Terminal commands, so please pay attention and triple check each step.
Open a Terminal.app (/Applications/Utilities/Terminal.app) and type:
cd /Volumes
ls -l
Examine the output of that, one should be your “broken” Volume. Once you have it identified, proceed with these steps, all in the Terminal. The first time you execute a command, your password may be required, this is normal.
The output may look like:
lrwxr-xr-x 1 root admin 1 Sep 2 12:23 MacintoshHD -> /
So the name you’re after is “MacintoshHD”.
Step Number One: Disable Spotlight for your Drive.
sudo mdutil -i off "/Volumes/the_name_you_have_identified_before"
Step Number Two: Remove the indexes from the Drive.
sudo mdutil -E "/Volumes/the_name_you_have_identified_before"
Step Number Three: Eliminate all Spotlight Files from the Drive. (two commands)
cd "/Volumes/the_name_you_have_identified_before"
sudo rm -fr .Spotlight-V100
Be careful with the last command, make sure you type it exactly as it appears.
Step Number Four: Re-enable spotlight in the Drive.
sudo mdutil -i on "/Volumes/the_name_you_have_identified_before"
Now this should trigger a Spotlight complete re-indexing. You have to be extremely patient with it. Spotlight sometimes appears to be frozen but it’s really indexing. It’s best to leave it overnight and be patient.
This happens whenever I erase the free space on my hard drive (probably for the same reason -- that process creates a big file that eats up all the free space, then overwrites it, creating a low space condition in the process). Typing this command at the terminal:
sudo mdutil -i on /Volumes/Hard_Disk_Name_Goes_Here
will rebuild your index. Substitute your own disk's volume name in the obvious place.
Best Answer
Just for reference, Spotlight index shouldn’t get corrupted, but when that’s the case see this question.
You have to remember that spotlight is a database and as such is prone to corruption; compared to relational databases for example, spotlight can only be deleted and rebuilt when that happens. There’s no “spotlight -repair” command (one can only wish).
All in all, it’s rare to see Spotlight failing in OS X 10.6, it has been very stable compared to the first Tiger version.
External applications, on the other hand, can make use of the APIs to store information in the metadata, and here’s where we lose control of what goes in there. If one external application is storing bad data, it could cause the whole index to go nuts.
Since you have a healthy working index now, try it for a few weeks and pay attention to any application or utility that claims to support Spotlight.
Good Luck!