org.apache.lucene.index
Class MergePolicy.OneMerge

java.lang.Object
  extended by org.apache.lucene.index.MergePolicy.OneMerge
Enclosing class:
MergePolicy

public static class MergePolicy.OneMerge
extends Object

OneMerge provides the information necessary to perform an individual primitive merge operation, resulting in a single new segment. The merge spec includes the subset of segments to be merged as well as whether the new segment should use the compound file format.


Field Summary
 long estimatedMergeBytes
           
 List<SegmentInfo> segments
           
 int totalDocCount
           
 
Constructor Summary
MergePolicy.OneMerge(List<SegmentInfo> segments)
           
 
Method Summary
 boolean getPause()
           
 String segString(Directory dir)
           
 void setPause(boolean paused)
           
 long totalBytesSize()
          Returns the total size in bytes of this merge.
 int totalNumDocs()
          Returns the total number of documents that are included with this merge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

estimatedMergeBytes

public long estimatedMergeBytes

segments

public final List<SegmentInfo> segments

totalDocCount

public final int totalDocCount
Constructor Detail

MergePolicy.OneMerge

public MergePolicy.OneMerge(List<SegmentInfo> segments)
Method Detail

setPause

public void setPause(boolean paused)

getPause

public boolean getPause()

segString

public String segString(Directory dir)

totalBytesSize

public long totalBytesSize()
                    throws IOException
Returns the total size in bytes of this merge. Note that this does not indicate the size of the merged segment, but the input total size.

Throws:
IOException

totalNumDocs

public int totalNumDocs()
                 throws IOException
Returns the total number of documents that are included with this merge. Note that this does not indicate the number of documents after the merge.

Throws:
IOException