Beispiel #1
0
		public NormsWriterPerField(DocInverterPerField docInverterPerField, NormsWriterPerThread perThread, FieldInfo fieldInfo)
		{
			this.perThread = perThread;
			this.fieldInfo = fieldInfo;
			docState = perThread.docState;
			fieldState = docInverterPerField.fieldState;
		}
Beispiel #2
0
 public NormsWriterPerField(DocInverterPerField docInverterPerField, NormsWriterPerThread perThread, FieldInfo fieldInfo)
 {
     this.perThread = perThread;
     this.fieldInfo = fieldInfo;
     docState       = perThread.docState;
     fieldState     = docInverterPerField.fieldState;
 }
Beispiel #3
0
        public override void  Flush(System.Collections.IDictionary threadsAndFields, SegmentWriteState state)
        {
            System.Collections.IDictionary childThreadsAndFields    = new System.Collections.Hashtable();
            System.Collections.IDictionary endChildThreadsAndFields = new System.Collections.Hashtable();

            System.Collections.IEnumerator it = new System.Collections.Hashtable(threadsAndFields).GetEnumerator();
            while (it.MoveNext())
            {
                System.Collections.DictionaryEntry entry = (System.Collections.DictionaryEntry)it.Current;

                DocInverterPerThread perThread = (DocInverterPerThread)entry.Key;

                System.Collections.ICollection fields = (System.Collections.ICollection)entry.Value;

                System.Collections.IEnumerator fieldsIt       = fields.GetEnumerator();
                System.Collections.Hashtable   childFields    = new System.Collections.Hashtable();
                System.Collections.Hashtable   endChildFields = new System.Collections.Hashtable();
                while (fieldsIt.MoveNext())
                {
                    DocInverterPerField perField = (DocInverterPerField)((System.Collections.DictionaryEntry)fieldsIt.Current).Key;
                    childFields[perField.consumer]       = perField.consumer;
                    endChildFields[perField.endConsumer] = perField.endConsumer;
                }

                childThreadsAndFields[perThread.consumer]       = childFields;
                endChildThreadsAndFields[perThread.endConsumer] = endChildFields;
            }

            consumer.Flush(childThreadsAndFields, state);
            endConsumer.Flush(endChildThreadsAndFields, state);
        }
Beispiel #4
0
		public TermsHashPerField(DocInverterPerField docInverterPerField, TermsHashPerThread perThread, TermsHashPerThread nextPerThread, FieldInfo fieldInfo)
		{
			InitBlock();
			this.perThread = perThread;
			intPool = perThread.intPool;
			charPool = perThread.charPool;
			bytePool = perThread.bytePool;
			docState = perThread.docState;
			fieldState = docInverterPerField.fieldState;
			this.consumer = perThread.consumer.AddField(this, fieldInfo);
			streamCount = consumer.GetStreamCount();
			numPostingInt = 2 * streamCount;
			this.fieldInfo = fieldInfo;
			if (nextPerThread != null)
				nextPerField = (TermsHashPerField) nextPerThread.AddField(docInverterPerField, fieldInfo);
			else
				nextPerField = null;
		}
Beispiel #5
0
 public TermsHashPerField(DocInverterPerField docInverterPerField, TermsHashPerThread perThread, TermsHashPerThread nextPerThread, FieldInfo fieldInfo)
 {
     InitBlock();
     this.perThread = perThread;
     intPool        = perThread.intPool;
     charPool       = perThread.charPool;
     bytePool       = perThread.bytePool;
     docState       = perThread.docState;
     fieldState     = docInverterPerField.fieldState;
     this.consumer  = perThread.consumer.AddField(this, fieldInfo);
     streamCount    = consumer.GetStreamCount();
     numPostingInt  = 2 * streamCount;
     this.fieldInfo = fieldInfo;
     if (nextPerThread != null)
     {
         nextPerField = (TermsHashPerField)nextPerThread.AddField(docInverterPerField, fieldInfo);
     }
     else
     {
         nextPerField = null;
     }
 }
 internal abstract InvertedDocEndConsumerPerField AddField(DocInverterPerField docInverterPerField, FieldInfo fieldInfo);
		internal abstract InvertedDocConsumerPerField AddField(DocInverterPerField docInverterPerField, FieldInfo fieldInfo);
Beispiel #8
0
		internal override InvertedDocEndConsumerPerField AddField(DocInverterPerField docInverterPerField, FieldInfo fieldInfo)
		{
			return new NormsWriterPerField(docInverterPerField, this, fieldInfo);
		}
Beispiel #9
0
 internal override InvertedDocConsumerPerField AddField(DocInverterPerField docInverterPerField, FieldInfo fieldInfo)
 {
     return(new TermsHashPerField(docInverterPerField, this, nextPerThread, fieldInfo));
 }
Beispiel #10
0
 internal override InvertedDocEndConsumerPerField AddField(DocInverterPerField docInverterPerField, FieldInfo fieldInfo)
 {
     return(new NormsWriterPerField(docInverterPerField, this, fieldInfo));
 }
Beispiel #11
0
		internal override InvertedDocConsumerPerField AddField(DocInverterPerField docInverterPerField, FieldInfo fieldInfo)
		{
			return new TermsHashPerField(docInverterPerField, this, nextPerThread, fieldInfo);
		}