public override DocumentsWriter.DocWriter FinishDocument() { DocumentsWriter.DocWriter oneDoc = one.FinishDocument(); DocumentsWriter.DocWriter twoDoc = two.FinishDocument(); if (oneDoc == null) { return(twoDoc); } else if (twoDoc == null) { return(oneDoc); } else { DocFieldConsumers.PerDoc both = parent.GetPerDoc(); both.docID = docState.docID; System.Diagnostics.Debug.Assert(oneDoc.docID == docState.docID); System.Diagnostics.Debug.Assert(twoDoc.docID == docState.docID); both.one = oneDoc; both.two = twoDoc; return(both); } }