Exemple #1
0
 public DocFieldConsumersPerThread(DocFieldProcessorPerThread docFieldProcessorPerThread, DocFieldConsumers parent, DocFieldConsumerPerThread one, DocFieldConsumerPerThread two)
 {
     this.parent = parent;
     this.one    = one;
     this.two    = two;
     docState    = docFieldProcessorPerThread.docState;
 }
		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 DocInverterPerThread(DocFieldProcessorPerThread docFieldProcessorPerThread, DocInverter docInverter)
 {
     InitBlock();
     this.docInverter = docInverter;
     docState         = docFieldProcessorPerThread.docState;
     consumer         = docInverter.consumer.AddThread(this);
     endConsumer      = docInverter.endConsumer.AddThread(this);
 }
Exemple #5
0
        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);
        }
Exemple #6
0
		public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread)
		{
			return new DocFieldConsumersPerThread(docFieldProcessorPerThread, this, one.AddThread(docFieldProcessorPerThread), two.AddThread(docFieldProcessorPerThread));
		}
Exemple #7
0
 /// <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;
 }
Exemple #9
0
		public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread)
		{
			return new DocInverterPerThread(docFieldProcessorPerThread, this);
		}
		public DocFieldProcessorPerField(DocFieldProcessorPerThread perThread, FieldInfo fieldInfo)
		{
			this.consumer = perThread.consumer.AddField(fieldInfo);
			this.fieldInfo = fieldInfo;
		}
			public PerDoc(DocFieldProcessorPerThread enclosingInstance)
			{
				InitBlock(enclosingInstance);
			}
			private void  InitBlock(DocFieldProcessorPerThread enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
			}
Exemple #13
0
 public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread)
 {
     return(new DocFieldConsumersPerThread(docFieldProcessorPerThread, this, one.AddThread(docFieldProcessorPerThread), two.AddThread(docFieldProcessorPerThread)));
 }
Exemple #14
0
 public override DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread)
 {
     return(new DocInverterPerThread(docFieldProcessorPerThread, this));
 }
Exemple #15
0
 private void  InitBlock(DocFieldProcessorPerThread enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
Exemple #16
0
 public PerDoc(DocFieldProcessorPerThread enclosingInstance)
 {
     InitBlock(enclosingInstance);
 }
Exemple #17
0
		/// <summary>Add a new thread </summary>
		public abstract DocFieldConsumerPerThread AddThread(DocFieldProcessorPerThread docFieldProcessorPerThread);