I would like to parse text content from any type of file to make it available for search. Say the file may be .txt, .docx - document type files or it may be an image, audio or video file.

I could find Apache Tika doing this. Is there any alternative tool available? Which one is the best among them for doing a text parser?

Can someone shed some insight on this.

1 Answer 1


As your search has already found Apache Tika as the best solution, this is because the task to wrangling data from many different sources is complicated and that is what Tika seeks to solve. To be clear Apache Tika uses other open source tools to do that actual data extraction: Such as Apache POI to extract data from Word documents, and I think it might use PDFBox to extract text from pdf documents.

It isn't hard to extract text from word documents, or pdf documents but you need to handle each case and to build a robust way of managing these other tools will involve recreating what is Apache Tika. When you come across more exotic document types (for which there is no parser) Tika provides interfaces for defining your own extractor and adding that to the set of documents it can work with.

So you can either use tika or hand role a solution. This said there are tools which extend tika and provide all-in-one document search features that being Apache Solr. Apache Solr is a server which provides document parsing and indexing features using a restful api (even to feed it the documents), under the hood it makes use of the Lucene framework. If you can't stand working though a restful api and want to work directly in Java then use Lucene directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.