public void Abort() { if (doc != null) { doc.Abort(); doc = null; } }
public DocumentsWriter.DocWriter FinishDocument() { // If there were any stored fields in this doc, doc will // be non-null; else it's null. try { return doc; } finally { doc = null; } }
public DocumentsWriter.DocWriter FinishDocument() { // If there were any stored fields in this doc, doc will // be non-null; else it's null. try { return(doc); } finally { doc = null; } }
public void AddField(Fieldable field, FieldInfo fieldInfo) { if (doc == null) { doc = storedFieldsWriter.GetPerDoc(); doc.docID = docState.docID; localFieldsWriter.SetFieldsStream(doc.fdt); System.Diagnostics.Debug.Assert(doc.numStoredFields == 0, "doc.numStoredFields=" + doc.numStoredFields); System.Diagnostics.Debug.Assert(0 == doc.fdt.Length()); System.Diagnostics.Debug.Assert(0 == doc.fdt.GetFilePointer()); } localFieldsWriter.WriteField(fieldInfo, field); System.Diagnostics.Debug.Assert(docState.TestPoint("StoredFieldsWriterPerThread.processFields.writeField")); doc.numStoredFields++; }