The Nautilus file manager searches the content of at least text and HTML files, listing hits in the results alongside filename matches. I don’t see a related setting in the options:
Preferably I would only disable this feature by default and invoke it when necessary by using a search prefix like
in:file: or similar.
I am not sure you can do that. I guess (not sure) that Nautilus relies on Tracker indexes and, as far as I know, you can only prevent or allow to search in a specific directory, not by file type.
I guess you will have to read some documentation about tracker.
Here is an interesting link you can start off with:
See if there is an option to disable content search… (for tracker-miner-fs)