You need a couple of tools for this. You need something to index and search content, and you've tagged the question with three good tools for this task, lucene, solr, and elasticsearch. Each one of them is rich with tutorials and examples to help you get started.
The other thing you will need, is a way to read the content from all those different file types. I'd recommend Apache Tika. It's an excellent toolkit for this, reads all the formats you've listed, and works well with Lucene.
You can see an example of their use together in this question : Tika in Action book examples Lucene StandardAnalyzer does not work