Class AbstractLuceneIndexCreator

java.lang.Object
org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
Direct Known Subclasses:
PositionStoringLuceneIndexCreator, SimpleLuceneIndexCreator

public abstract class AbstractLuceneIndexCreator extends Object
This is an abstract class with general index creation functionality.
Author:
Michael Röder (roeder@informatik.uni-leipzig.de)
  • Field Details

    • version

      protected static final org.apache.lucene.util.Version version
    • DEFAULT_COMMIT_INTERVAL

      protected static final int DEFAULT_COMMIT_INTERVAL
      See Also:
      Constant Field Values
    • textFieldName

      protected String textFieldName
      The name of the field in which the document texts are stored.
    • commitInterval

      protected int commitInterval
      The interval in which changes are committed to the index.
  • Constructor Details

    • AbstractLuceneIndexCreator

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

      public AbstractLuceneIndexCreator(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 Details

    • toLuceneDocument

      protected org.apache.lucene.document.Document toLuceneDocument(org.apache.lucene.analysis.Analyzer analyzer, String text, org.apache.lucene.document.FieldType fieldType) throws IOException
      Throws:
      IOException
    • addDocumentLength

      protected void addDocumentLength(org.apache.lucene.document.Document document, String docLengthFieldName, org.apache.lucene.document.FieldType docLengthFieldType, int documentLength)
    • getCommitInterval

      public int getCommitInterval()
    • setCommitInterval

      public void setCommitInterval(int commitInterval)
    • getTextFieldName

      public String getTextFieldName()