Class AbstractLuceneIndexCreator

    • Field Detail

      • 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 Detail

      • 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 Detail

      • 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()