Class SimpleLuceneIndexCreator
java.lang.Object
org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
org.aksw.palmetto.corpus.lucene.creation.SimpleLuceneIndexCreator
This class creates the Lucene indexes which are used to access the reference corpus during the coherence calculation
using a
LuceneCorpusAdapter.- Author:
- Michael Röder (roeder@informatik.uni-leipzig.de)
-
Field Summary
FieldsFields inherited from class org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
commitInterval, DEFAULT_COMMIT_INTERVAL, textFieldName, version -
Constructor Summary
ConstructorsConstructorDescriptionSimpleLuceneIndexCreator(String fieldName)Constructor.SimpleLuceneIndexCreator(String textFieldName, int commitInterval)Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateIndex(File indexPath, Iterator<String> docIterator)Creates the index.Methods inherited from class org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
addDocumentLength, getCommitInterval, getTextFieldName, setCommitInterval, toLuceneDocument
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
SimpleLuceneIndexCreator
Constructor.- Parameters:
fieldName- The name of the field in which the document texts are stored.
-
SimpleLuceneIndexCreator
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
-
createIndex
Creates the index.- Parameters:
indexPath- The path to the director in which the Lucene index will be createddocIterator- Iterator that iterates over the document texts.- Returns:
- true if the creation was successful, else false.
-