public static class MergePolicy.OneMerge extends Object
| Modifier and Type | Field and Description | 
|---|---|
| long | estimatedMergeBytesEstimated size in bytes of the merged segment. | 
| MergeRateLimiter | rateLimiterA private  RateLimiterfor this merge, used to rate limit writes and abort. | 
| List<SegmentCommitInfo> | segmentsSegments to be merged. | 
| int | totalMaxDocTotal number of documents in segments to be merged, not accounting for deletions. | 
| Constructor and Description | 
|---|
| MergePolicy.OneMerge(List<SegmentCommitInfo> segments)Sole constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| MergePolicy.DocMap | getDocMap(MergeState mergeState)Expert: If  getMergeReaders()reorders document IDs, this method
  must be overridden to return a mapping from the natural doc ID
  (the doc ID that would result from a natural merge) to the actual doc
  ID. | 
| SegmentCommitInfo | getMergeInfo()Returns the  SegmentCommitInfofor the merged segment,
 or null if it hasn't been set yet. | 
| List<CodecReader> | getMergeReaders()Expert: Get the list of readers to merge. | 
| MergeInfo | getStoreMergeInfo()Return  MergeInfodescribing this merge. | 
| void | mergeFinished()Called by  IndexWriterafter the merge is done and all readers have been closed. | 
| String | segString()Returns a readable description of the current merge
  state. | 
| void | setMergeInfo(SegmentCommitInfo info)Expert: Sets the  SegmentCommitInfoof the merged segment. | 
| 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. | 
public volatile long estimatedMergeBytes
public final List<SegmentCommitInfo> segments
public final MergeRateLimiter rateLimiter
RateLimiter for this merge, used to rate limit writes and abort.public final int totalMaxDoc
public MergePolicy.OneMerge(List<SegmentCommitInfo> segments)
segments - List of SegmentCommitInfos
        to be merged.public void mergeFinished()
                   throws IOException
IndexWriter after the merge is done and all readers have been closed.IOExceptionpublic List<CodecReader> getMergeReaders() throws IOException
MergePolicy.OneMerge
  reorders doc IDs, it must override getDocMap(org.apache.lucene.index.MergeState) too so that
  deletes that happened during the merge can be applied to the newly
  merged segment.IOExceptionpublic void setMergeInfo(SegmentCommitInfo info)
SegmentCommitInfo of the merged segment.
 Allows sub-classes to e.g. set diagnostics properties.public SegmentCommitInfo getMergeInfo()
SegmentCommitInfo for the merged segment,
 or null if it hasn't been set yet.public MergePolicy.DocMap getDocMap(MergeState mergeState)
getMergeReaders() reorders document IDs, this method
  must be overridden to return a mapping from the natural doc ID
  (the doc ID that would result from a natural merge) to the actual doc
  ID. This mapping is used to apply deletions that happened during the
  merge to the new segment.public String segString()
public long totalBytesSize()
                    throws IOException
IOExceptionpublic int totalNumDocs()
                 throws IOException
IOExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.