Ejemplo n.º 1
0
 public DocInverterPerThread(DocFieldProcessorPerThread docFieldProcessorPerThread, DocInverter docInverter)
 {
     InitBlock();
     this.docInverter = docInverter;
     docState         = docFieldProcessorPerThread.docState;
     consumer         = docInverter.consumer.AddThread(this);
     endConsumer      = docInverter.endConsumer.AddThread(this);
 }
Ejemplo n.º 2
0
		public DocInverterPerThread(DocFieldProcessorPerThread docFieldProcessorPerThread, DocInverter docInverter)
		{
			InitBlock();
			this.docInverter = docInverter;
			docState = docFieldProcessorPerThread.docState;
			consumer = docInverter.consumer.AddThread(this);
			endConsumer = docInverter.endConsumer.AddThread(this);
		}
Ejemplo n.º 3
0
        public override void Flush(ICollection <DocConsumerPerThread> threads, SegmentWriteState state)
        {
            var childThreadsAndFields = new HashMap <DocFieldConsumerPerThread, ICollection <DocFieldConsumerPerField> >();

            foreach (DocConsumerPerThread thread in threads)
            {
                DocFieldProcessorPerThread perThread = (DocFieldProcessorPerThread)thread;
                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);
            state.flushedFiles.Add(fileName);
        }
Ejemplo n.º 4
0
		public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread)
		{
			return new DocFieldConsumersPerThread(docFieldProcessorPerThread, this, one.AddThread(docFieldProcessorPerThread), two.AddThread(docFieldProcessorPerThread));
		}
		public DocFieldProcessorPerField(DocFieldProcessorPerThread perThread, FieldInfo fieldInfo)
		{
			this.consumer = perThread.consumer.AddField(fieldInfo);
			this.fieldInfo = fieldInfo;
		}
Ejemplo n.º 6
0
 /// <summary>Add a new thread </summary>
 public abstract DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread);
Ejemplo n.º 7
0
 public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread)
 {
     return(new DocInverterPerThread(docFieldProcessorPerThread, this));
 }
 private void  InitBlock(DocFieldProcessorPerThread enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
 public PerDoc(DocFieldProcessorPerThread enclosingInstance)
 {
     InitBlock(enclosingInstance);
 }
Ejemplo n.º 10
0
 public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread)
 {
     return(new DocFieldConsumersPerThread(docFieldProcessorPerThread, this, one.AddThread(docFieldProcessorPerThread), two.AddThread(docFieldProcessorPerThread)));
 }
Ejemplo n.º 11
0
		/// <summary>Add a new thread </summary>
		public abstract DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread);
Ejemplo n.º 12
0
 public DocFieldProcessorPerField(DocFieldProcessorPerThread perThread, FieldInfo fieldInfo)
 {
     this.consumer  = perThread.consumer.AddField(fieldInfo);
     this.fieldInfo = fieldInfo;
 }
			private void  InitBlock(DocFieldProcessorPerThread enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
			}
			public PerDoc(DocFieldProcessorPerThread enclosingInstance)
			{
				InitBlock(enclosingInstance);
			}
Ejemplo n.º 15
0
		public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread)
		{
			return new DocInverterPerThread(docFieldProcessorPerThread, this);
		}