Example usage for org.apache.lucene.codecs.blocktree BlockTreeTermsWriter DEFAULT_MAX_BLOCK_SIZE

List of usage examples for org.apache.lucene.codecs.blocktree BlockTreeTermsWriter DEFAULT_MAX_BLOCK_SIZE

Introduction

In this page you can find the example usage for org.apache.lucene.codecs.blocktree BlockTreeTermsWriter DEFAULT_MAX_BLOCK_SIZE.

Prototype

int DEFAULT_MAX_BLOCK_SIZE

To view the source code for org.apache.lucene.codecs.blocktree BlockTreeTermsWriter DEFAULT_MAX_BLOCK_SIZE.

Click Source Link

Document

Suggested default value for the maxItemsInBlock parameter to #BlockTreeTermsWriter(SegmentWriteState,PostingsWriterBase,int,int) .

Usage

From source file:com.lucure.core.codec.LucurePostingsFormat.java

License:Apache License

/** Creates {@code Lucene41PostingsFormat} with default
 *  settings. */// ww w .j av a  2s  . c om
public LucurePostingsFormat() {
    this(BlockTreeTermsWriter.DEFAULT_MIN_BLOCK_SIZE, BlockTreeTermsWriter.DEFAULT_MAX_BLOCK_SIZE);
}

From source file:com.rocana.lucene.codec.v1.RocanaLucene50PostingsFormat.java

License:Apache License

/** Creates {@code RocanaLucene50PostingsFormat} with default
 *  settings. *///from w  ww  .  j  ava2  s.c  o  m
public RocanaLucene50PostingsFormat() {
    this(BlockTreeTermsWriter.DEFAULT_MIN_BLOCK_SIZE, BlockTreeTermsWriter.DEFAULT_MAX_BLOCK_SIZE);
}

From source file:com.sindicetech.siren.index.codecs.siren10.Siren10PostingsFormat.java

License:Open Source License

@Override
public FieldsConsumer fieldsConsumer(final SegmentWriteState state) throws IOException {
    final PostingsWriterBase postingsWriter = new Siren10PostingsWriter(state, this.getFactory());

    boolean success = false;
    try {//from  w w w . j  a v a  2  s  . c  o  m
        final FieldsConsumer ret = new BlockTreeTermsWriter(state, postingsWriter,
                BlockTreeTermsWriter.DEFAULT_MIN_BLOCK_SIZE, BlockTreeTermsWriter.DEFAULT_MAX_BLOCK_SIZE);
        success = true;
        return ret;
    } finally {
        if (!success) {
            postingsWriter.close();
        }
    }
}