In Spotlight you can enable and disable file categories that will appear in search results. How does Spotlight determine that a certain file belongs to a certain category? The following specific event triggered this curiosity:
For some time
.tex files would come up under the Documents category. Spotlight would handle the search
filename.tex just fine. Then suddenly I could not find
.tex files anymore in Spotlight. Finder searches were OK though.
Turns out that I had the Developer category disabled in the Spotlight preferences, and Spotlight now thought that
.tex files belonged in that category. After enabling the Developer category everything went back to normal.
What made Spotlight decide to switch categories for the