public override FieldsConsumer FieldsConsumer(SegmentWriteState state) { PostingsWriterBase docsWriter = null; PostingsWriterBase pulsingWriterInner = null; PostingsWriterBase pulsingWriter = null; // Terms dict bool success = false; try { docsWriter = new Lucene41PostingsWriter(state); pulsingWriterInner = new PulsingPostingsWriter(state, 2, docsWriter); pulsingWriter = new PulsingPostingsWriter(state, 1, pulsingWriterInner); FieldsConsumer ret = new BlockTreeTermsWriter(state, pulsingWriter, BlockTreeTermsWriter.DEFAULT_MIN_BLOCK_SIZE, BlockTreeTermsWriter.DEFAULT_MAX_BLOCK_SIZE); success = true; return ret; } finally { if (!success) { IOUtils.CloseWhileHandlingException(docsWriter, pulsingWriterInner, pulsingWriter); } } }
public override FieldsConsumer FieldsConsumer(SegmentWriteState state) { PostingsWriterBase docsWriter = null; // Terms that have <= freqCutoff number of docs are // "pulsed" (inlined): PostingsWriterBase pulsingWriter = null; // Terms dict bool success = false; try { docsWriter = _wrappedPostingsBaseFormat.PostingsWriterBase(state); // Terms that have <= freqCutoff number of docs are // "pulsed" (inlined): pulsingWriter = new PulsingPostingsWriter(state, _freqCutoff, docsWriter); FieldsConsumer ret = new BlockTreeTermsWriter(state, pulsingWriter, _minBlockSize, _maxBlockSize); success = true; return(ret); } finally { if (!success) { IOUtils.CloseWhileHandlingException(docsWriter, pulsingWriter); } } }
public override FieldsConsumer FieldsConsumer(SegmentWriteState state) { PostingsWriterBase docsWriter = null; // Terms that have <= freqCutoff number of docs are // "pulsed" (inlined): PostingsWriterBase pulsingWriter = null; // Terms dict bool success = false; try { docsWriter = _wrappedPostingsBaseFormat.PostingsWriterBase(state); // Terms that have <= freqCutoff number of docs are // "pulsed" (inlined): pulsingWriter = new PulsingPostingsWriter(state, _freqCutoff, docsWriter); FieldsConsumer ret = new BlockTreeTermsWriter(state, pulsingWriter, _minBlockSize, _maxBlockSize); success = true; return ret; } finally { if (!success) { IOUtils.CloseWhileHandlingException(docsWriter, pulsingWriter); } } }