19 using System.Collections;
20 using System.Collections.Generic;
21 using Lucene.Net.Support;
23 namespace Lucene.Net.Index
43 this.docWriter = docWriter;
44 this.consumer = consumer;
45 consumer.SetFieldInfos(fieldInfos);
51 consumer.CloseDocStore(state);
52 fieldsWriter.CloseDocStore(state);
55 public override void Flush(ICollection<DocConsumerPerThread> threads,
SegmentWriteState state)
57 var childThreadsAndFields =
new HashMap<DocFieldConsumerPerThread, ICollection<DocFieldConsumerPerField>>();
61 childThreadsAndFields[perThread.consumer] = perThread.
Fields();
62 perThread.TrimFields(state);
64 fieldsWriter.Flush(state);
65 consumer.Flush(childThreadsAndFields, state);
72 fieldInfos.Write(state.directory, fileName);
73 state.flushedFiles.Add(fileName);
76 public override void Abort()
82 public override bool FreeRAM()
84 return consumer.FreeRAM();