public DocFieldProcessorPerThread(DocumentsWriterThreadState threadState, DocFieldProcessor docFieldProcessor)
 {
     this.docState          = threadState.docState;
     this.docFieldProcessor = docFieldProcessor;
     this.fieldInfos        = docFieldProcessor.fieldInfos;
     this.consumer          = docFieldProcessor.consumer.addThread(this);
 }
 public DocFieldConsumersPerThread(DocFieldProcessorPerThread docFieldProcessorPerThread, DocFieldConsumers parent, DocFieldConsumerPerThread one, DocFieldConsumerPerThread two)
 {
     this.parent = parent;
     this.one    = one;
     this.two    = two;
     docState    = docFieldProcessorPerThread.docState;
 }
Example #3
0
 public DocInverterPerThread(DocFieldProcessorPerThread docFieldProcessorPerThread, DocInverter docInverter)
 {
     this.docInverter = docInverter;
     docState         = docFieldProcessorPerThread.docState;
     consumer         = docInverter.consumer.addThread(this);
     endConsumer      = docInverter.endConsumer.addThread(this);
 }
		public DocFieldConsumersPerThread(DocFieldProcessorPerThread docFieldProcessorPerThread, DocFieldConsumers parent, DocFieldConsumerPerThread one, DocFieldConsumerPerThread two)
		{
			this.parent = parent;
			this.one = one;
			this.two = two;
			docState = docFieldProcessorPerThread.docState;
		}
		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;
		}
Example #6
0
        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;
            }
        }
Example #7
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;

            // Sorter requires the char pool.
            _sorter = new Sorter <RawPostingList, PostingComparer>(new PostingComparer(this));

            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;
            }
        }
Example #8
0
 public NormsWriterPerField(DocInverterPerField docInverterPerField, NormsWriterPerThread perThread, FieldInfo fieldInfo)
 {
     this.perThread = perThread;
     this.fieldInfo = fieldInfo;
     docState       = perThread.docState;
     fieldState     = docInverterPerField.fieldState;
 }
 public DocFieldProcessorPerThread(DocumentsWriterThreadState threadState, DocFieldProcessor docFieldProcessor)
 {
     InitBlock();
     this.docState          = threadState.docState;
     this.docFieldProcessor = docFieldProcessor;
     this.fieldInfos        = docFieldProcessor.fieldInfos;
     this.consumer          = docFieldProcessor.consumer.AddThread(this);
     fieldsWriter           = docFieldProcessor.fieldsWriter.AddThread(docState);
 }
 public FreqProxTermsWriterPerField(TermsHashPerField termsHashPerField, FreqProxTermsWriterPerThread perThread, FieldInfo fieldInfo)
 {
     this.termsHashPerField = termsHashPerField;
     this.perThread         = perThread;
     this.fieldInfo         = fieldInfo;
     docState   = termsHashPerField.docState;
     fieldState = termsHashPerField.fieldState;
     omitTermFreqAndPositions = fieldInfo.omitTermFreqAndPositions;
 }
 public DocInverterPerField(DocInverterPerThread perThread, FieldInfo fieldInfo)
 {
     this.perThread   = perThread;
     this.fieldInfo   = fieldInfo;
     docState         = perThread.docState;
     fieldState       = perThread.fieldState;
     this.consumer    = perThread.consumer.AddField(this, fieldInfo);
     this.endConsumer = perThread.endConsumer.AddField(this, fieldInfo);
 }
 public TermVectorsTermsWriterPerField(TermsHashPerField termsHashPerField, TermVectorsTermsWriterPerThread perThread, FieldInfo fieldInfo)
 {
     this.termsHashPerField = termsHashPerField;
     this.perThread         = perThread;
     this.termsWriter       = perThread.termsWriter;
     this.fieldInfo         = fieldInfo;
     docState   = termsHashPerField.docState;
     fieldState = termsHashPerField.fieldState;
 }
 public DocumentsWriterThreadState(DocumentsWriter docWriter)
 {
     this.docWriter          = docWriter;
     docState                = new DocumentsWriter.DocState();
     docState.maxFieldLength = docWriter.maxFieldLength;
     docState.infoStream     = docWriter.infoStream;
     docState.similarity     = docWriter.similarity;
     docState.docWriter      = docWriter;
     consumer                = docWriter.consumer.AddThread(this);
 }
		public DocumentsWriterThreadState(DocumentsWriter docWriter)
		{
			this.docWriter = docWriter;
			docState = new DocumentsWriter.DocState();
			docState.maxFieldLength = docWriter.maxFieldLength;
			docState.infoStream = docWriter.infoStream;
			docState.similarity = docWriter.similarity;
			docState.docWriter = docWriter;
			consumer = docWriter.consumer.AddThread(this);
		}
Example #15
0
 public DocumentsWriterThreadState(DocumentsWriter docWriter)
 {
     this.docWriter               = docWriter;
     docState                     = new DocumentsWriter.DocState();
     docState.maxFieldLength      = docWriter.maxFieldLength;
     docState.infoStream          = docWriter.infoStream;
     docState.similarity          = docWriter.similarity;
     docState.docWriter           = docWriter;
     docState.allowMinus1Position = docWriter.writer.GetAllowMinus1Position();
     consumer                     = docWriter.consumer.AddThread(this);
 }
 public TermsHashPerField(DocInverterPerField docInverterPerField, TermsHashPerThread perThread, TermsHashPerThread nextPerThread, FieldInfo fieldInfo)
 {
     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;
     }
 }
		public NormsWriterPerThread(DocInverterPerThread docInverterPerThread, NormsWriter normsWriter)
		{
			this.normsWriter = normsWriter;
			docState = docInverterPerThread.docState;
		}
		public FreqProxTermsWriterPerThread(TermsHashPerThread perThread)
		{
			docState = perThread.docState;
			termsHashPerThread = perThread;
		}
 public TermVectorsTermsWriterPerThread(TermsHashPerThread termsHashPerThread, TermVectorsTermsWriter termsWriter)
 {
     this.termsWriter        = termsWriter;
     this.termsHashPerThread = termsHashPerThread;
     docState = termsHashPerThread.docState;
 }
 public FreqProxTermsWriterPerThread(TermsHashPerThread perThread)
 {
     docState           = perThread.docState;
     termsHashPerThread = perThread;
 }
Example #21
0
 public NormsWriterPerThread(DocInverterPerThread docInverterPerThread, NormsWriter normsWriter)
 {
     this.normsWriter = normsWriter;
     docState         = docInverterPerThread.docState;
 }
 public StoredFieldsWriterPerField(StoredFieldsWriterPerThread perThread, FieldInfo fieldInfo)
 {
     this.perThread = perThread;
     this.fieldInfo = fieldInfo;
     docState       = perThread.docState;
 }
Example #23
0
 public StoredFieldsWriterPerThread AddThread(DocumentsWriter.DocState docState)
 {
     return(new StoredFieldsWriterPerThread(docState, this));
 }
 public StoredFieldsWriterPerThread(DocumentsWriter.DocState docState, StoredFieldsWriter storedFieldsWriter)
 {
     this.storedFieldsWriter = storedFieldsWriter;
     this.docState           = docState;
     localFieldsWriter       = new FieldsWriter((IndexOutput)null, (IndexOutput)null, storedFieldsWriter.fieldInfos);
 }
 public StoredFieldsWriterPerThread(DocFieldProcessorPerThread docFieldProcessorPerThread, StoredFieldsWriter storedFieldsWriter)
 {
     this.storedFieldsWriter = storedFieldsWriter;
     this.docState           = docFieldProcessorPerThread.docState;
     localFieldsWriter       = new FieldsWriter((IndexOutput)null, (IndexOutput)null, storedFieldsWriter.fieldInfos);
 }