Save This Page
Home » lucene-3.0.1-src » org.apache » lucene » index » [javadoc | source]
org.apache.lucene.index
final class: SegmentMerger [javadoc | source]
java.lang.Object
   org.apache.lucene.index.SegmentMerger
The SegmentMerger class combines two or more Segments, represented by an IndexReader (#add , into a single Segment. After adding the appropriate readers, call the merge method to combine the segments.

If the compoundFile flag is set, then the segments will be merged into a compound file.

Nested Class Summary:
static class  SegmentMerger.CheckAbort   
Field Summary
static final  byte[] NORMS_HEADER    norms header placeholder 
 boolean omitTermFreqAndPositions     
Constructor:
 SegmentMerger(Directory dir,
    String name) 
    This ctor used only by test code.
    Parameters:
    dir - The Directory to merge the other segments into
    name - The name of the new segment
 SegmentMerger(IndexWriter writer,
    String name,
    OneMerge merge) 
Method from org.apache.lucene.index.SegmentMerger Summary:
add,   closeReaders,   createCompoundFile,   getDelCounts,   getDocMaps,   hasProx,   merge,   merge,   segmentReader
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.index.SegmentMerger Detail:
 final  void add(IndexReader reader) 
    Add an IndexReader to the collection of readers that are to be merged
 final  void closeReaders() throws IOException 
    close all IndexReaders that have been added. Should not be called before merge().
 final List<String> createCompoundFile(String fileName) throws IOException 
 int[] getDelCounts() 
 int[][] getDocMaps() 
 boolean hasProx() 
 final int merge() throws CorruptIndexException, IOException 
    Merges the readers specified by the #add method into the directory passed to the constructor
 final int merge(boolean mergeDocStores) throws CorruptIndexException, IOException 
    Merges the readers specified by the #add method into the directory passed to the constructor.
 final IndexReader segmentReader(int i)