edu.mayo.informatics.indexer.lucene
Class LuceneRAMBatchIndexWriter
java.lang.Object
edu.mayo.informatics.indexer.lucene.LuceneRAMBatchIndexWriter
- All Implemented Interfaces:
- LuceneIndexWriterInterface
public class LuceneRAMBatchIndexWriter
- extends java.lang.Object
- implements LuceneIndexWriterInterface
Indexes documents into a RAMDirectory, and then flushes the RAMDirectory to
disk when docsPerTempIndex_ is reached. Gives small speed gains over a
standard FSDirectory.
- Author:
- Dan Armbrust
Constructor Summary |
LuceneRAMBatchIndexWriter(java.io.File location,
boolean clearContents,
org.apache.lucene.analysis.Analyzer analyzer)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LuceneRAMBatchIndexWriter
public LuceneRAMBatchIndexWriter(java.io.File location,
boolean clearContents,
org.apache.lucene.analysis.Analyzer analyzer)
throws InternalIndexerErrorException
- Throws:
InternalIndexerErrorException
close
public void close()
throws InternalIndexerErrorException
- Specified by:
close
in interface LuceneIndexWriterInterface
- Throws:
InternalIndexerErrorException
addDocument
public void addDocument(org.apache.lucene.document.Document document)
throws InternalIndexerErrorException
- Specified by:
addDocument
in interface LuceneIndexWriterInterface
- Throws:
InternalIndexerErrorException
addDocument
public void addDocument(org.apache.lucene.document.Document document,
org.apache.lucene.analysis.Analyzer analyzer)
throws InternalIndexerErrorException
- Specified by:
addDocument
in interface LuceneIndexWriterInterface
- Throws:
InternalIndexerErrorException
setDocsPerTempIndex
public void setDocsPerTempIndex(int i)
- Specified by:
setDocsPerTempIndex
in interface LuceneIndexWriterInterface
- Parameters:
i
-
setMaxFieldLength
public void setMaxFieldLength(int i)
- Specified by:
setMaxFieldLength
in interface LuceneIndexWriterInterface
- Parameters:
i
-
setMaxMergeDocs
public void setMaxMergeDocs(int i)
- Specified by:
setMaxMergeDocs
in interface LuceneIndexWriterInterface
- Parameters:
i
-
setMaxBufferedDocs
public void setMaxBufferedDocs(int i)
- Specified by:
setMaxBufferedDocs
in interface LuceneIndexWriterInterface
setMergeFactor
public void setMergeFactor(int i)
- Specified by:
setMergeFactor
in interface LuceneIndexWriterInterface
- Parameters:
i
-
setUseCompoundFile
public void setUseCompoundFile(boolean bool)
- Specified by:
setUseCompoundFile
in interface LuceneIndexWriterInterface
optimize
public void optimize()
throws InternalIndexerErrorException
- Specified by:
optimize
in interface LuceneIndexWriterInterface
- Throws:
InternalIndexerErrorException
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.lang.Throwable