Refactoring to separate generic Lucene functionality from the document definition