public DocFieldConsumersPerThread(DocFieldProcessorPerThread docFieldProcessorPerThread, DocFieldConsumers parent, DocFieldConsumerPerThread one, DocFieldConsumerPerThread two) { this.parent = parent; this.one = one; this.two = two; docState = docFieldProcessorPerThread.docState; }
public DocInverterPerThread(DocFieldProcessorPerThread docFieldProcessorPerThread, DocInverter docInverter) { InitBlock(); this.docInverter = docInverter; docState = docFieldProcessorPerThread.docState; consumer = docInverter.consumer.AddThread(this); endConsumer = docInverter.endConsumer.AddThread(this); }
public override void Flush(System.Collections.ICollection threads, SegmentWriteState state) { System.Collections.IDictionary childThreadsAndFields = new System.Collections.Hashtable(); System.Collections.IEnumerator it = threads.GetEnumerator(); while (it.MoveNext()) { DocFieldProcessorPerThread perThread = (DocFieldProcessorPerThread)((System.Collections.DictionaryEntry)it.Current).Key; childThreadsAndFields[perThread.consumer] = perThread.Fields(); perThread.TrimFields(state); } fieldsWriter.Flush(state); consumer.Flush(childThreadsAndFields, state); // Important to save after asking consumer to flush so // consumer can alter the FieldInfo* if necessary. EG, // FreqProxTermsWriter does this with // FieldInfo.storePayload. System.String fileName = state.SegmentFileName(IndexFileNames.FIELD_INFOS_EXTENSION); fieldInfos.Write(state.directory, fileName); SupportClass.CollectionsHelper.AddIfNotContains(state.flushedFiles, fileName); }
public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread) { return new DocFieldConsumersPerThread(docFieldProcessorPerThread, this, one.AddThread(docFieldProcessorPerThread), two.AddThread(docFieldProcessorPerThread)); }
/// <summary>Add a new thread </summary> public abstract DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread);
public DocFieldProcessorPerField(DocFieldProcessorPerThread perThread, FieldInfo fieldInfo) { this.consumer = perThread.consumer.AddField(fieldInfo); this.fieldInfo = fieldInfo; }
public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread) { return new DocInverterPerThread(docFieldProcessorPerThread, this); }
public PerDoc(DocFieldProcessorPerThread enclosingInstance) { InitBlock(enclosingInstance); }
private void InitBlock(DocFieldProcessorPerThread enclosingInstance) { this.enclosingInstance = enclosingInstance; }
public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread) { return(new DocFieldConsumersPerThread(docFieldProcessorPerThread, this, one.AddThread(docFieldProcessorPerThread), two.AddThread(docFieldProcessorPerThread))); }
public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread) { return(new DocInverterPerThread(docFieldProcessorPerThread, this)); }