public OneMerge(List<SegmentCommitInfo> segments) {if (0 == segments.size()) {throw new RuntimeException("segments must include at least one segment");}this.segments = new ArrayList<>(segments);int count = 0;for(SegmentCommitInfo info : segments) {count += info.info.maxDoc();}totalMaxDoc = count;mergeProgress = new OneMergeProgress();}
public OneMerge(IList<SegmentCommitInfo> segments){if (0 == segments.Count){throw new Exception("segments must include at least one segment");}this.Segments = new List<SegmentCommitInfo>(segments);int count = 0;foreach (SegmentCommitInfo info in segments){count += info.Info.DocCount;}TotalDocCount = count;}