Class AbstractLuceneIndexCreator
- java.lang.Object
-
- org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
-
- Direct Known Subclasses:
LuceneIndexTransformer,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 Summary
Fields Modifier and Type Field Description protected intcommitIntervalThe interval in which changes are committed to the index.protected static intDEFAULT_COMMIT_INTERVALprotected StringtextFieldNameThe name of the field in which the document texts are stored.protected static org.apache.lucene.util.Versionversion
-
Constructor Summary
Constructors Constructor Description AbstractLuceneIndexCreator(String textFieldName)Constructor.AbstractLuceneIndexCreator(String textFieldName, int commitInterval)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDocumentLength(org.apache.lucene.document.Document document, String docLengthFieldName, org.apache.lucene.document.FieldType docLengthFieldType, int documentLength)intgetCommitInterval()StringgetTextFieldName()voidsetCommitInterval(int commitInterval)protected org.apache.lucene.document.DocumenttoLuceneDocument(org.apache.lucene.analysis.Analyzer analyzer, String text, org.apache.lucene.document.FieldType fieldType)
-
-
-
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()
-
-