コード例 #1
0
ファイル: TermsHashPerThread.cs プロジェクト: vernon016/mono
        public TermsHashPerThread(DocInverterPerThread docInverterPerThread, TermsHash termsHash, TermsHash nextTermsHash, TermsHashPerThread primaryPerThread)
        {
            docState = docInverterPerThread.docState;

            this.termsHash = termsHash;
            this.consumer  = termsHash.consumer.AddThread(this);

            if (nextTermsHash != null)
            {
                // We are primary
                charPool = new CharBlockPool(termsHash.docWriter);
                primary  = true;
            }
            else
            {
                charPool = primaryPerThread.charPool;
                primary  = false;
            }

            intPool  = new IntBlockPool(termsHash.docWriter, termsHash.trackAllocations);
            bytePool = new ByteBlockPool(termsHash.docWriter.byteBlockAllocator, termsHash.trackAllocations);

            if (nextTermsHash != null)
            {
                nextPerThread = nextTermsHash.AddThread(docInverterPerThread, this);
            }
            else
            {
                nextPerThread = null;
            }
        }
コード例 #2
0
ファイル: TermsHashPerThread.cs プロジェクト: carrie901/mono
		public TermsHashPerThread(DocInverterPerThread docInverterPerThread, TermsHash termsHash, TermsHash nextTermsHash, TermsHashPerThread primaryPerThread)
		{
			docState = docInverterPerThread.docState;
			
			this.termsHash = termsHash;
			this.consumer = termsHash.consumer.AddThread(this);
			
			if (nextTermsHash != null)
			{
				// We are primary
				charPool = new CharBlockPool(termsHash.docWriter);
				primary = true;
			}
			else
			{
				charPool = primaryPerThread.charPool;
				primary = false;
			}
			
			intPool = new IntBlockPool(termsHash.docWriter, termsHash.trackAllocations);
			bytePool = new ByteBlockPool(termsHash.docWriter.byteBlockAllocator, termsHash.trackAllocations);
			
			if (nextTermsHash != null)
				nextPerThread = nextTermsHash.AddThread(docInverterPerThread, this);
			else
				nextPerThread = null;
		}
コード例 #3
0
ファイル: TermsHashPerField.cs プロジェクト: carrie901/mono
		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;
		}
コード例 #4
0
ファイル: TermsHashPerField.cs プロジェクト: vernon016/mono
 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;
     }
 }