Ejemplo n.º 1
0
 public void  Abort()
 {
     if (doc != null)
     {
         doc.Abort();
         doc = null;
     }
 }
Ejemplo n.º 2
0
		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;
			}
		}
Ejemplo n.º 3
0
 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;
     }
 }
Ejemplo n.º 4
0
		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++;
		}
Ejemplo n.º 5
0
        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++;
        }
Ejemplo n.º 6
0
		public void  Abort()
		{
			if (doc != null)
			{
				doc.Abort();
				doc = null;
			}
		}