Class AbstractLuceneIndexCreator
java.lang.Object
org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
- Direct Known Subclasses:
PositionStoringLuceneIndexCreator,SimpleLuceneIndexCreator
This is an abstract class with general index creation functionality.
- Author:
- Michael Röder (roeder@informatik.uni-leipzig.de)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe interval in which changes are committed to the index.protected static intprotected StringThe name of the field in which the document texts are stored.protected static org.apache.lucene.util.Version -
Constructor Summary
ConstructorsConstructorDescriptionAbstractLuceneIndexCreator(String textFieldName)Constructor.AbstractLuceneIndexCreator(String textFieldName, int commitInterval)Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDocumentLength(org.apache.lucene.document.Document document, String docLengthFieldName, org.apache.lucene.document.FieldType docLengthFieldType, int documentLength)intvoidsetCommitInterval(int commitInterval)protected org.apache.lucene.document.DocumenttoLuceneDocument(org.apache.lucene.analysis.Analyzer analyzer, String text, org.apache.lucene.document.FieldType fieldType)
-
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
The name of the field in which the document texts are stored. -
commitInterval
protected int commitIntervalThe interval in which changes are committed to the index.
-
-
Constructor Details
-
AbstractLuceneIndexCreator
Constructor.- Parameters:
textFieldName- The name of the field in which the document texts are stored.
-
AbstractLuceneIndexCreator
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
-