Class LuceneIndexTransformer


  • public class LuceneIndexTransformer
    extends AbstractLuceneIndexCreator
    This class creates a simpler boolean document index based on a position storing index. Most users won't find this class helpful since it has only been created for a special situation, i.e., a user has a (large) position storing index and want to transform it into a faster boolean document index.
    Author:
    Michael Röder (roeder@informatik.uni-leipzig.de)
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
    • Constructor Detail

      • LuceneIndexTransformer

        public LuceneIndexTransformer​(String fieldName)
        Constructor.
        Parameters:
        fieldName - The name of the field in which the document texts are stored.
      • LuceneIndexTransformer

        public LuceneIndexTransformer​(String textFieldName,
                                      int commitInterval)
        Constructor.
        Parameters:
        textFieldName - The name of the field in which the document texts are stored.
        commitInterval - The interval in which changes are committed to the index.
    • Method Detail

      • createIndex

        public boolean createIndex​(File posIndexPath,
                                   File booleanIndexPath,
                                   Set<String> whiteList)
        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.