Class PositionStoringLuceneIndexCreator

    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • docLengthFieldName

        protected String docLengthFieldName
    • Constructor Detail

      • PositionStoringLuceneIndexCreator

        public PositionStoringLuceneIndexCreator​(String textFieldName,
                                                 String docLengthFieldName)
      • PositionStoringLuceneIndexCreator

        public PositionStoringLuceneIndexCreator​(String textFieldName,
                                                 String docLengthFieldName,
                                                 int commitInterval)
    • Method Detail

      • createIndex

        public boolean createIndex​(File indexPath,
                                   Iterator<IndexableDocument> docIterator)
        Creates the index.
        Parameters:
        indexPath - The path to the director in which the Lucene index will be created
        docIterator - Iterator that iterates over the document texts.
        Returns:
        true if the creation was successful, else false.