C# Class Lucene.Net.Index.MergePolicy.OneMerge

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.
显示文件 Open project: apache/lucenenet Class Usage Examples

Public Properties

Property Type Description
EstimatedMergeBytes long
MaxNumSegments int
Segments IList
TotalDocCount int

Private Properties

Property Type Description
Abort void

Public Methods

Method Description
CheckAborted ( Directory dir ) : void

Called periodically by IndexWriter while merging to see if the merge is aborted.

GetDocMap ( Lucene.Net.Index.MergeState mergeState ) : DocMap

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. this mapping is used to apply deletions that happened during the merge to the new segment.

OneMerge ( IList segments ) : System

Sole constructor.

SegString ( Directory dir ) : string

Returns a readable description of the current merge state.

TotalBytesSize ( ) : long

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. this is only set once the merge is initialized by IndexWriter.

TotalNumDocs ( ) : int

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.

Private Methods

Method Description
Abort ( ) : void

Mark this merge as aborted. If this is called before the merge is committed then the merge will not be committed.

Method Details

CheckAborted() public method

Called periodically by IndexWriter while merging to see if the merge is aborted.
public CheckAborted ( Directory dir ) : void
dir Directory
return void

GetDocMap() public method

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. this mapping is used to apply deletions that happened during the merge to the new segment.
public GetDocMap ( Lucene.Net.Index.MergeState mergeState ) : DocMap
mergeState Lucene.Net.Index.MergeState
return DocMap

OneMerge() public method

Sole constructor.
public OneMerge ( IList segments ) : System
segments IList List of s /// to be merged.
return System

SegString() public method

Returns a readable description of the current merge state.
public SegString ( Directory dir ) : string
dir Directory
return string

TotalBytesSize() public method

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. this is only set once the merge is initialized by IndexWriter.
public TotalBytesSize ( ) : long
return long

TotalNumDocs() public method

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.
public TotalNumDocs ( ) : int
return int

Property Details

EstimatedMergeBytes public_oe property

Estimated size in bytes of the merged segment.
public long EstimatedMergeBytes
return long

MaxNumSegments public_oe property

public int MaxNumSegments
return int

Segments public_oe property

Segments to be merged.
public IList Segments
return IList

TotalDocCount public_oe property

Number of documents in the merged segment.
public int TotalDocCount
return int