I looked on a search and found this suggestion:
The guaranteed way to reenable Spotlight is to reload it into launchd using launchctl:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
When I did this, and then entered my password, Terminal said that Spotlight was already loaded.
But it still doesn't work.