com.atlassian.bonnie.index
Interface BatchOpIndexer

All Known Implementing Classes:
BaseMultiThreadedIndexer

public interface BatchOpIndexer

Performs batch operations on an index.


Nested Class Summary
static interface BatchOpIndexer.DocumentWritingScheme
          Writes documents.
 
Method Summary
 org.apache.lucene.analysis.Analyzer getAnalyzer()
          Get analyzer used for indexing.
 void reindex(ObjectQueue queue, BatchOpIndexer.DocumentWritingScheme documentWritingScheme, com.atlassian.core.util.ProgressMeter progress, boolean truncate)
          Indexes objects in batch.
 void truncateIndex()
          Truncate the index.
 

Method Detail

reindex

public void reindex(ObjectQueue queue,
                    BatchOpIndexer.DocumentWritingScheme documentWritingScheme,
                    com.atlassian.core.util.ProgressMeter progress,
                    boolean truncate)
             throws java.io.IOException
Indexes objects in batch.

Parameters:
queue - queue of objects to index
documentWritingScheme - document writing scheme to use
progress - progress meter indicating index progress
truncate - should the original index be truncated?
Throws:
java.io.IOException

truncateIndex

public void truncateIndex()
                   throws java.io.IOException
Truncate the index. Depending on implementations, this can mean deleting the documents one by one, or other more efficient ways of removing documents from the index. Either way, this method results in an empty (but valid) Lucene index.

Throws:
java.io.IOException

getAnalyzer

public org.apache.lucene.analysis.Analyzer getAnalyzer()
Get analyzer used for indexing.



Copyright © 2006-2009 Atlassian Software Systems Pty Ltd. All Rights Reserved.