public class SimpleLuceneIndexCreator extends AbstractLuceneIndexCreator
LuceneCorpusAdapter.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
commitInterval, DEFAULT_COMMIT_INTERVAL, textFieldName, version| Constructor and Description |
|---|
SimpleLuceneIndexCreator(String fieldName)
Constructor.
|
SimpleLuceneIndexCreator(String textFieldName,
int commitInterval)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
createIndex(File indexPath,
Iterator<String> docIterator)
Creates the index.
|
addDocumentLength, getCommitInterval, getTextFieldName, setCommitInterval, toLuceneDocumentpublic SimpleLuceneIndexCreator(String fieldName)
fieldName - The name of the field in which the document texts are stored.public SimpleLuceneIndexCreator(String textFieldName, int commitInterval)
textFieldName - The name of the field in which the document texts are stored.commitInterval - The interval in which changes are committed to the index.public boolean createIndex(File indexPath, Iterator<String> docIterator)
indexPath - The path to the director in which the Lucene index will be createddocIterator - Iterator that iterates over the document texts.Copyright © 2014–2016. All rights reserved.