For email, I store everything in mboxes, and index/search with Mairix[2]. It's wickedly fast and the search capabilities make gmail blush. I use a little script to search:
if mairix -o $$ $*; then
mutt -e 'set quit=yes' -f ~/Mail/$$
fi
rm ~/Mail/$$
It's very common that I want to find an email from sometime in the last month, so my most common search is something like: search d:1m- alice
And I'll have an instant view of all emails from alice in the last month. [1] https://www.lesbonscomptes.com/recoll/
[2] https://github.com/rc0/mairixFor everything else that's just plain text, ripgrep or ctrl+shift+f in the IDE.
There's a commercial version that prioritized bugfixes, making the free and open version less attractive than it used to be. But it's still one of the better tools for the job when you want more than a grep-equivalent.
At my previous job I created something similar for a recruitment sister company. They had a ton of CV's in all kinds of formats (Word, Excel, PDF, rtf, plain text etc). I used Lucene.NET to do the indexing.
Both companies no longer exist and I've needed to find some text in docs of my own. If I have a bit of time I could recreate the app pretty easily.
It works both on Windows and Linux and can be pretty fast.
if you want to go beyond, advanced stuff like elastic search might be necessary, though