I would keep everything in word or pdf but instead of searching the document with PHP I would make a python script to search through the documents, call it from PHP and return matching documents to PHP. Python is much faster for such things.
If you would have document contents in the database, mysql search would be fast too, but you have some limitations with content length (here is some info about the limitations) and also you have to read all the documents and save them to the database. I think you save a lot of time to just make a python script to search through them.
EDIT
Here are some performance tests (2016). If you are using PHP 7 it is actually the fastest.
https://blog.famzah.net/2016/02/09/cpp-vs-python-vs-perl-vs-php-performance-benchmark-2016/
Also check this article => "Python is further considered to be the best programming language for developing scientific applications and applications that are required to process a huge amount of data."