internal FormatPostingsDocsWriter(SegmentWriteState state, FormatPostingsTermsWriter parent, IState s) : base()
        {
            this.parent = parent;
            System.String fileName = IndexFileNames.SegmentFileName(parent.parent.segment, IndexFileNames.FREQ_EXTENSION);
            state.flushedFiles.Add(fileName);
            out_Renamed  = parent.parent.dir.CreateOutput(fileName, s);
            totalNumDocs = parent.parent.totalNumDocs;

            // TODO: abstraction violation
            skipInterval   = parent.parent.termsOut.skipInterval;
            skipListWriter = parent.parent.skipListWriter;
            skipListWriter.SetFreqOutput(out_Renamed);

            posWriter = new FormatPostingsPositionsWriter(state, this, s);
        }
		internal FormatPostingsDocsWriter(SegmentWriteState state, FormatPostingsTermsWriter parent):base()
		{
			this.parent = parent;
			System.String fileName = IndexFileNames.SegmentFileName(parent.parent.segment, IndexFileNames.FREQ_EXTENSION);
			SupportClass.CollectionsHelper.AddIfNotContains(state.flushedFiles, fileName);
			out_Renamed = parent.parent.dir.CreateOutput(fileName);
			totalNumDocs = parent.parent.totalNumDocs;
			
			// TODO: abstraction violation
			skipInterval = parent.parent.termsOut.skipInterval;
			skipListWriter = parent.parent.skipListWriter;
			skipListWriter.SetFreqOutput(out_Renamed);
			
			posWriter = new FormatPostingsPositionsWriter(state, this);
		}