Class PositionStoringLuceneIndexCreator
- java.lang.Object
-
- org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
-
- org.aksw.palmetto.corpus.lucene.creation.PositionStoringLuceneIndexCreator
-
public class PositionStoringLuceneIndexCreator extends AbstractLuceneIndexCreator
This class creates the Lucene indexes which are used to access the reference corpus during the coherence calculation using aWindowSupportingLuceneCorpusAdapter.- Author:
- Michael Röder (roeder@informatik.uni-leipzig.de)
-
-
Field Summary
Fields Modifier and Type Field Description protected StringdocLengthFieldNameprivate static org.slf4j.LoggerLOGGER-
Fields inherited from class org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
commitInterval, DEFAULT_COMMIT_INTERVAL, textFieldName, version
-
-
Constructor Summary
Constructors Constructor Description PositionStoringLuceneIndexCreator(String textFieldName, String docLengthFieldName)PositionStoringLuceneIndexCreator(String textFieldName, String docLengthFieldName, int commitInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancreateIndex(File indexPath, Iterator<IndexableDocument> docIterator)Creates the index.-
Methods inherited from class org.aksw.palmetto.corpus.lucene.creation.AbstractLuceneIndexCreator
addDocumentLength, getCommitInterval, getTextFieldName, setCommitInterval, toLuceneDocument
-
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
docLengthFieldName
protected String docLengthFieldName
-
-
Method Detail
-
createIndex
public boolean createIndex(File indexPath, Iterator<IndexableDocument> docIterator)
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.
-
-