Lubel is a multi-type file handler to obtain Apache Lucene Documents from different source files, trying to abstract the developer from the task of documents parsing.
First of all you need to include lubel in your project (compiling or adding it through Maven). After that, you just need to instance the fileIndexer class in your code in this way:
// All your previous code...
// Get the instance from the factory
FileIndexer fileIndexer = FileIndexerFactory.getFileIndexer();
// Now you can delegate the document creation
// and the writer addition in the FileIndexer
fileIndexer.index(writer, fileToIndex);
// More code...
- Plain Text (*.txt)
- HTML
- Microsoft Word (*.doc) and (*.docx)
- Microsoft PowerPoint (*.ppt)
- PowerPoint files (*.pptx)
- Excel files (*.xls) or (*.xlsx)
- ePub
- XML
- JSON
- LibreOffice/OpenOffice writer (*.odt)
- HTML parser optimization