public abstract class AbstractLuceneIndexCreator extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
commitInterval
The interval in which changes are committed to the index.
|
protected static int |
DEFAULT_COMMIT_INTERVAL |
protected String |
textFieldName
The name of the field in which the document texts are stored.
|
protected static org.apache.lucene.util.Version |
version |
| Constructor and Description |
|---|
AbstractLuceneIndexCreator(String textFieldName)
Constructor.
|
AbstractLuceneIndexCreator(String textFieldName,
int commitInterval)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDocumentLength(org.apache.lucene.document.Document document,
String docLengthFieldName,
org.apache.lucene.document.FieldType docLengthFieldType,
int documentLength) |
int |
getCommitInterval() |
String |
getTextFieldName() |
void |
setCommitInterval(int commitInterval) |
protected org.apache.lucene.document.Document |
toLuceneDocument(org.apache.lucene.analysis.Analyzer analyzer,
String text,
org.apache.lucene.document.FieldType fieldType) |
protected static final org.apache.lucene.util.Version version
protected static final int DEFAULT_COMMIT_INTERVAL
protected String textFieldName
protected int commitInterval
public AbstractLuceneIndexCreator(String textFieldName)
textFieldName - The name of the field in which the document texts are stored.public AbstractLuceneIndexCreator(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.protected org.apache.lucene.document.Document toLuceneDocument(org.apache.lucene.analysis.Analyzer analyzer,
String text,
org.apache.lucene.document.FieldType fieldType)
throws IOException
IOExceptionprotected void addDocumentLength(org.apache.lucene.document.Document document,
String docLengthFieldName,
org.apache.lucene.document.FieldType docLengthFieldType,
int documentLength)
public int getCommitInterval()
public void setCommitInterval(int commitInterval)
public String getTextFieldName()
Copyright © 2014–2016. All rights reserved.