Method FindMergesForOptimize
FindMergesForOptimize(SegmentInfos, Int32, ISet<SegmentInfo>)
Determine what set of merge operations is necessary in order to optimize the index. IndexWriter calls this when its Optimize() method is called. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.
Declaration
public abstract MergePolicy.MergeSpecification FindMergesForOptimize(SegmentInfos segmentInfos, int maxSegmentCount, ISet<SegmentInfo> segmentsToOptimize)
Parameters
Type | Name | Description |
---|---|---|
SegmentInfos | segmentInfos | the total set of segments in the index |
System.Int32 | maxSegmentCount | requested maximum number of segments in the index (currently this is always 1) |
ISet<SegmentInfo> | segmentsToOptimize | contains the specific SegmentInfo instances that must be merged away. This may be a subset of all SegmentInfos. |
Returns
Type | Description |
---|---|
MergePolicy.MergeSpecification |