Hi ! I work with search engine for the last 15 years. I think I see what is your project and what you need. I think first, even it's something you will not like, you can't do a search engine for 5 To only with mysql & php. I'm sure of that. I think the limit is around 1Go of data / 1M of document if you want a response < 10s. In the best case. With a heavy process of splitting word, that slow the index process.
I understand you don't want to pay to 3rd party software. I agree too. Don't. I think the best choice is something around Lucene. You have several option around Lucene, but may be for your project I think Apache SolR can be a good option, with php around to custom output.
Then you have pdf file. Solr (or others) need a textual version. So if don't already have it, you have to find to a solution like fantomjs or the good old pdftotext.
I will be happy to speak with you about theses choices,
Have a good day.