Is there a way to index a file or a file tree from the console so that searching for substrings can be done faster than plain grepping?

I don't necessarily need support for regular expressions, although case insensitivity would be good to have.

I'm looking for a simple console utility that would work similar to `locate/slocate/mlocate` but instead of file names would index file contents with specific mime types in a configurable location.

So far the only 'faster-than-grep' solution which I've found is `fgrep` constrained to ANSI rather than UTF-8 (from <https://stackoverflow.com/a/13913220/191246>) — while it provides an impressive speedup, it is still too slow for large files. I would like to know if there is some 'cheap' way to create an index and search against it.

I am considering [whoosh](https://pypi.python.org/pypi/Whoosh/) as an option but that would require extra coding. 

I am not interested in system-level indexing apps like spotlight on mac or their linux counterparts, since I am looking for something granular at file or subfolder level.