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 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;
 }
Пример #3
0
			private void  InitBlock(TermVectorsTermsWriter enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
                buffer = enclosingInstance.docWriter.NewPerDocBuffer();
                perDocTvf = new RAMOutputStream(buffer);
			}
Пример #4
0
			public PerDoc(TermVectorsTermsWriter enclosingInstance)
			{
				InitBlock(enclosingInstance);
			}
			private void  InitBlock(TermVectorsTermsWriter enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
			}
Пример #6
0
 private void  InitBlock(TermVectorsTermsWriter enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
     buffer    = enclosingInstance.docWriter.NewPerDocBuffer();
     perDocTvf = new RAMOutputStream(buffer);
 }
Пример #7
0
 public PerDoc(TermVectorsTermsWriter enclosingInstance)
 {
     InitBlock(enclosingInstance);
 }
Пример #8
0
 private void  InitBlock(TermVectorsTermsWriter enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
 public TermVectorsTermsWriterPerThread(TermsHashPerThread termsHashPerThread, TermVectorsTermsWriter termsWriter)
 {
     this.termsWriter = termsWriter;
     this.termsHashPerThread = termsHashPerThread;
     docState = termsHashPerThread.docState;
 }
 public TermVectorsTermsWriterPerThread(TermsHashPerThread termsHashPerThread, TermVectorsTermsWriter termsWriter)
 {
     this.termsWriter        = termsWriter;
     this.termsHashPerThread = termsHashPerThread;
     docState = termsHashPerThread.docState;
 }
Пример #11
0
			internal override DocConsumer GetChain(DocumentsWriter documentsWriter)
			{
				/*
				This is the current indexing chain:
				
				DocConsumer / DocConsumerPerThread
				--> code: DocFieldProcessor / DocFieldProcessorPerThread
				--> DocFieldConsumer / DocFieldConsumerPerThread / DocFieldConsumerPerField
				--> code: DocFieldConsumers / DocFieldConsumersPerThread / DocFieldConsumersPerField
				--> code: DocInverter / DocInverterPerThread / DocInverterPerField
				--> InvertedDocConsumer / InvertedDocConsumerPerThread / InvertedDocConsumerPerField
				--> code: TermsHash / TermsHashPerThread / TermsHashPerField
				--> TermsHashConsumer / TermsHashConsumerPerThread / TermsHashConsumerPerField
				--> code: FreqProxTermsWriter / FreqProxTermsWriterPerThread / FreqProxTermsWriterPerField
				--> code: TermVectorsTermsWriter / TermVectorsTermsWriterPerThread / TermVectorsTermsWriterPerField
				--> InvertedDocEndConsumer / InvertedDocConsumerPerThread / InvertedDocConsumerPerField
				--> code: NormsWriter / NormsWriterPerThread / NormsWriterPerField
				--> code: StoredFieldsWriter / StoredFieldsWriterPerThread / StoredFieldsWriterPerField
				*/
				
				// Build up indexing chain:
				
				TermsHashConsumer termVectorsWriter = new TermVectorsTermsWriter(documentsWriter);
				TermsHashConsumer freqProxWriter = new FreqProxTermsWriter();
				
				InvertedDocConsumer termsHash = new TermsHash(documentsWriter, true, freqProxWriter, new TermsHash(documentsWriter, false, termVectorsWriter, null));
				NormsWriter normsWriter = new NormsWriter();
				DocInverter docInverter = new DocInverter(termsHash, normsWriter);
				return new DocFieldProcessor(documentsWriter, docInverter);
			}
Пример #12
0
        internal DocumentsWriter(Directory directory, IndexWriter writer)
        {
            this.directory = directory;
            this.writer = writer;
            this.similarity = writer.GetSimilarity();
            flushedDocCount = writer.MaxDoc();

            byteBlockAllocator = new ByteBlockAllocator(this);
            waitQueue = new WaitQueue(this);

            /*
              This is the current indexing chain:

              DocConsumer / DocConsumerPerThread
                --> code: DocFieldProcessor / DocFieldProcessorPerThread
                  --> DocFieldConsumer / DocFieldConsumerPerThread / DocFieldConsumerPerField
                    --> code: DocFieldConsumers / DocFieldConsumersPerThread / DocFieldConsumersPerField
                      --> code: DocInverter / DocInverterPerThread / DocInverterPerField
                        --> InvertedDocConsumer / InvertedDocConsumerPerThread / InvertedDocConsumerPerField
                          --> code: TermsHash / TermsHashPerThread / TermsHashPerField
                            --> TermsHashConsumer / TermsHashConsumerPerThread / TermsHashConsumerPerField
                              --> code: FreqProxTermsWriter / FreqProxTermsWriterPerThread / FreqProxTermsWriterPerField
                              --> code: TermVectorsTermsWriter / TermVectorsTermsWriterPerThread / TermVectorsTermsWriterPerField
                        --> InvertedDocEndConsumer / InvertedDocConsumerPerThread / InvertedDocConsumerPerField
                          --> code: NormsWriter / NormsWriterPerThread / NormsWriterPerField
                      --> code: StoredFieldsWriter / StoredFieldsWriterPerThread / StoredFieldsWriterPerField
            */

            // TODO FI: this should be something the user can pass in
            // Build up indexing chain:
            TermsHashConsumer termVectorsWriter = new TermVectorsTermsWriter(this);
            TermsHashConsumer freqProxWriter = new FreqProxTermsWriter();

            InvertedDocConsumer termsHash = new TermsHash(this, true, freqProxWriter,
                                                                 new TermsHash(this, false, termVectorsWriter, null));
            NormsWriter normsWriter = new NormsWriter();
            DocInverter docInverter = new DocInverter(termsHash, normsWriter);
            StoredFieldsWriter fieldsWriter = new StoredFieldsWriter(this);
            DocFieldConsumers docFieldConsumers = new DocFieldConsumers(docInverter, fieldsWriter);
            consumer = docFieldProcessor = new DocFieldProcessor(this, docFieldConsumers);
        }
Пример #13
0
		static DocumentsWriter()
		{
			DefaultIndexingChain = new IndexingChain()
            { GetChain = (documentsWriter) =>
			    {
				    /*
				    This is the current indexing chain:
				
				    DocConsumer / DocConsumerPerThread
				    --> code: DocFieldProcessor / DocFieldProcessorPerThread
				    --> DocFieldConsumer / DocFieldConsumerPerThread / DocFieldConsumerPerField
				    --> code: DocFieldConsumers / DocFieldConsumersPerThread / DocFieldConsumersPerField
				    --> code: DocInverter / DocInverterPerThread / DocInverterPerField
				    --> InvertedDocConsumer / InvertedDocConsumerPerThread / InvertedDocConsumerPerField
				    --> code: TermsHash / TermsHashPerThread / TermsHashPerField
				    --> TermsHashConsumer / TermsHashConsumerPerThread / TermsHashConsumerPerField
				    --> code: FreqProxTermsWriter / FreqProxTermsWriterPerThread / FreqProxTermsWriterPerField
				    --> code: TermVectorsTermsWriter / TermVectorsTermsWriterPerThread / TermVectorsTermsWriterPerField
				    --> InvertedDocEndConsumer / InvertedDocConsumerPerThread / InvertedDocConsumerPerField
				    --> code: NormsWriter / NormsWriterPerThread / NormsWriterPerField
				    --> code: StoredFieldsWriter / StoredFieldsWriterPerThread / StoredFieldsWriterPerField
				    */
				
				    // Build up indexing chain:
				
				    TermsHashConsumer termVectorsWriter = new TermVectorsTermsWriter(documentsWriter);
				    TermsHashConsumer freqProxWriter = new FreqProxTermsWriter();
				
				    InvertedDocConsumer termsHash = new TermsHash(documentsWriter, true, freqProxWriter, new TermsHash(documentsWriter, false, termVectorsWriter, null));
				    NormsWriter normsWriter = new NormsWriter();
				    DocInverter docInverter = new DocInverter(termsHash, normsWriter);
				    return new DocFieldProcessor(documentsWriter, docInverter);
			    }
            };
			POINTER_NUM_BYTE = Constants.JRE_IS_64BIT?8:4;
		}
Пример #14
0
 internal PerDoc(TermVectorsTermsWriter enclosing_instance)
 {
     this.enclosing_instance = enclosing_instance;
 }
 internal PerDoc(TermVectorsTermsWriter enclosing_instance)
 {
     this.enclosing_instance = enclosing_instance;
 }