Esempio n. 1
0
        private void  MergeTerms()
        {
            try
            {
                freqOutput      = directory.CreateOutput(segment + ".frq");
                proxOutput      = directory.CreateOutput(segment + ".prx");
                termInfosWriter = new TermInfosWriter(directory, segment, fieldInfos, termIndexInterval);
                skipInterval    = termInfosWriter.skipInterval;
                maxSkipLevels   = termInfosWriter.maxSkipLevels;
                skipListWriter  = new DefaultSkipListWriter(skipInterval, maxSkipLevels, mergedDocs, freqOutput, proxOutput);
                queue           = new SegmentMergeQueue(readers.Count);

                MergeTermInfos();
            }
            finally
            {
                if (freqOutput != null)
                {
                    freqOutput.Close();
                }
                if (proxOutput != null)
                {
                    proxOutput.Close();
                }
                if (termInfosWriter != null)
                {
                    termInfosWriter.Close();
                }
                if (queue != null)
                {
                    queue.Close();
                }
            }
        }
Esempio n. 2
0
        private void  MergeTerms()
        {
            SegmentWriteState state = new SegmentWriteState(null, directory, segment, null, mergedDocs, 0, termIndexInterval);

            FormatPostingsFieldsConsumer consumer = new FormatPostingsFieldsWriter(state, fieldInfos);

            try
            {
                queue = new SegmentMergeQueue(readers.Count);

                MergeTermInfos(consumer);
            }
            finally
            {
                consumer.Finish();
                if (queue != null)
                {
                    queue.Close();
                }
            }
        }
Esempio n. 3
0
		private void  MergeTerms()
		{
			
			SegmentWriteState state = new SegmentWriteState(null, directory, segment, null, mergedDocs, 0, termIndexInterval);
			
			FormatPostingsFieldsConsumer consumer = new FormatPostingsFieldsWriter(state, fieldInfos);
			
			try
			{
				queue = new SegmentMergeQueue(readers.Count);
				
				MergeTermInfos(consumer);
			}
			finally
			{
				consumer.Finish();
				if (queue != null)
					queue.Close();
			}
		}
Esempio n. 4
0
 public override void  Close()
 {
     queue.Close();
 }
Esempio n. 5
0
        private void MergeTerms()
        {
            try
            {
                freqOutput = directory.CreateOutput(segment + ".frq");
                proxOutput = directory.CreateOutput(segment + ".prx");
                termInfosWriter = new TermInfosWriter(directory, segment, fieldInfos, termIndexInterval);
                skipInterval = termInfosWriter.skipInterval;
                queue = new SegmentMergeQueue(readers.Count);

                MergeTermInfos();
            }
            finally
            {
                if (freqOutput != null)
                    freqOutput.Close();
                if (proxOutput != null)
                    proxOutput.Close();
                if (termInfosWriter != null)
                    termInfosWriter.Close();
                if (queue != null)
                    queue.Close();
            }
        }
        private void MergeTerms()
        {
            try
            {
                freqOutput = directory.CreateOutput(segment + ".frq");
                if (HasProx())
                    proxOutput = directory.CreateOutput(segment + ".prx");
                termInfosWriter = new TermInfosWriter(directory, segment, fieldInfos, termIndexInterval);
                skipInterval = termInfosWriter.skipInterval;
                maxSkipLevels = termInfosWriter.maxSkipLevels;
                skipListWriter = new DefaultSkipListWriter(skipInterval, maxSkipLevels, mergedDocs, freqOutput, proxOutput);
                queue = new SegmentMergeQueue(readers.Count);

                MergeTermInfos();
            }
            finally
            {
                if (freqOutput != null)
                    freqOutput.Close();
                if (proxOutput != null)
                    proxOutput.Close();
                if (termInfosWriter != null)
                    termInfosWriter.Close();
                if (queue != null)
                    queue.Close();
            }
        }