Spotlight is nice service, but in my opinion, it has very limited control options in GUI, so I had to start digging into the internals to solve some of its problems. Here is solution for one of them.
I've noticed that Spotlight doesn't want to index some plain text files in my home Documents folder. It turns out that, to be indexed, text files must meet rather specific conditions. In particular, they must have the extension .txt or .text, OR they should have file type set to TEXT. The simplest method, of course, would be to rename the files, but this is not always possible, so a second method is always a good option.
I don't know if it's possible to change a file's type from the GUI, so I use the command line utility SetFile from the Developer Tools package for this. SetFile -t TEXT filename will do the job and will make your file indexable.
To check if a given file (not only text files) is already indexed, you'll need to use the mdimport command. In the Terminal, type mdimport -d1 filename_to_test. If it says something like this:
2005-05-03 22:27:53.872 mdimport[336] Import 'filename' type
'dyn.ah62d4rv4gk8z2addrf3u' no mdimporter
then Spotlight doesn't recognize the format (no mdimporter is the key part) of filename. If it says something like this:
2005-05-03 22:29:46.764 mdimport[338] Import 'filename' type
'com.apple.traditional-mac-plain-text' using
'file://localhost/System/Library/Spotlight/RichText.mdimporter/'
Then it's all good and file is already indexed. Enjoy!
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050504014044694