/// <summary> /// Sole constructor. </summary> internal MergeState(IList <AtomicReader> readers, SegmentInfo segmentInfo, InfoStream infoStream, CheckAbort checkAbort) { this.Readers = readers; this.SegmentInfo = segmentInfo; this.InfoStream = infoStream; this.CheckAbort = checkAbort; }
// note, just like in codec apis Directory 'dir' is NOT the same as segmentInfo.dir!! internal SegmentMerger(IList <AtomicReader> readers, SegmentInfo segmentInfo, InfoStream infoStream, Directory dir, int termIndexInterval, CheckAbort checkAbort, FieldInfos.FieldNumbers fieldNumbers, IOContext context, bool validate) { // validate incoming readers if (validate) { foreach (AtomicReader reader in readers) { reader.CheckIntegrity(); } } mergeState = new MergeState(readers, segmentInfo, infoStream, checkAbort); directory = dir; this.termIndexInterval = termIndexInterval; this.codec = segmentInfo.Codec; this.context = context; this.fieldInfosBuilder = new FieldInfos.Builder(fieldNumbers); mergeState.SegmentInfo.DocCount = SetDocMaps(); }