org.apache.lucene.codecs.uniformsplit

## Class UniformSplitPostingsFormat

- java.lang.Object
- - org.apache.lucene.codecs.PostingsFormat
  - - org.apache.lucene.codecs.uniformsplit.UniformSplitPostingsFormat

All Implemented Interfaces:
  NamedSPILoader.NamedSPI

Direct Known Subclasses:
  STUniformSplitPostingsFormat

    public class UniformSplitPostingsFormat
    extends PostingsFormat

`PostingsFormat` based on the Uniform Split technique.

See Also:
  `UniformSplitTermsWriter`
WARNING: This API is experimental and might change in incompatible ways in the next release.

### Field Summary

Fields
`protected BlockDecoder` `blockDecoder`
`protected BlockEncoder` `blockEncoder`
`protected int` `deltaNumLines`
`static String` `NAME`
`protected int` `targetNumBlockLines`
`static String` `TERMS_BLOCKS_EXTENSION` Extension of the file containing the terms blocks for each field and the fields metadata.
`static String` `TERMS_DICTIONARY_EXTENSION` Extension of the file containing the terms dictionary (the FST "trie").
`static int` `VERSION_CURRENT`

### Fields inherited from class org.apache.lucene.codecs.PostingsFormat

`EMPTY`

### Constructor Summary

Constructors
`` `UniformSplitPostingsFormat()`
`` `UniformSplitPostingsFormat(int targetNumBlockLines, int deltaNumLines, BlockEncoder blockEncoder, BlockDecoder blockDecoder)`
`protected` `UniformSplitPostingsFormat(String name, int targetNumBlockLines, int deltaNumLines, BlockEncoder blockEncoder, BlockDecoder blockDecoder)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected FieldsProducer` `createUniformSplitTermsReader(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder)`
`protected FieldsConsumer` `createUniformSplitTermsWriter(PostingsWriterBase postingsWriter, SegmentWriteState state, int targetNumBlockLines, int deltaNumLines, BlockEncoder blockEncoder)`
`FieldsConsumer` `fieldsConsumer(SegmentWriteState state)`
`FieldsProducer` `fieldsProducer(SegmentReadState state)`

### Methods inherited from class org.apache.lucene.codecs.PostingsFormat

`availablePostingsFormats, forName, getName, reloadPostingsFormats, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### TERMS_DICTIONARY_EXTENSION

    public static final String TERMS_DICTIONARY_EXTENSION

Extension of the file containing the terms dictionary (the FST "trie").

See Also:
  Constant Field Values

#### TERMS_BLOCKS_EXTENSION

    public static final String TERMS_BLOCKS_EXTENSION

Extension of the file containing the terms blocks for each field and the fields metadata.

See Also:
  Constant Field Values

#### VERSION_CURRENT

    public static final int VERSION_CURRENT

See Also:
  Constant Field Values

#### NAME

    public static final String NAME

See Also:
  Constant Field Values

#### targetNumBlockLines

    protected final int targetNumBlockLines

#### deltaNumLines

    protected final int deltaNumLines

#### blockEncoder

    protected final BlockEncoder blockEncoder

#### blockDecoder

    protected final BlockDecoder blockDecoder

### Constructor Detail

#### UniformSplitPostingsFormat

    public UniformSplitPostingsFormat()

#### UniformSplitPostingsFormat

    public UniformSplitPostingsFormat(int targetNumBlockLines,
                                      int deltaNumLines,
                                      BlockEncoder blockEncoder,
                                      BlockDecoder blockDecoder)

Parameters:
  `targetNumBlockLines` - Target number of lines per block. Must be strictly greater than 0. The parameters can be pre-validated with `UniformSplitTermsWriter.validateSettings(int, int)`. There is one term per block line, with its corresponding details (`TermState`).
  `deltaNumLines` - Maximum allowed delta variation of the number of lines per block. Must be greater than or equal to 0 and strictly less than `targetNumBlockLines`. The block size will be `targetNumBlockLines`+-`deltaNumLines`. The block size must always be less than or equal to `UniformSplitTermsWriter.MAX_NUM_BLOCK_LINES`.
  `blockEncoder` - Optional block encoder, may be null if none. It can be used for compression or encryption.
  `blockDecoder` - Optional block decoder, may be null if none. It can be used for compression or encryption.

#### UniformSplitPostingsFormat

    protected UniformSplitPostingsFormat(String name,
                                         int targetNumBlockLines,
                                         int deltaNumLines,
                                         BlockEncoder blockEncoder,
                                         BlockDecoder blockDecoder)

### Method Detail

#### fieldsConsumer

    public FieldsConsumer fieldsConsumer(SegmentWriteState state)
                                  throws IOException

Specified by:
  `fieldsConsumer` in class `PostingsFormat`
Throws:
  `IOException`

#### fieldsProducer

    public FieldsProducer fieldsProducer(SegmentReadState state)
                                  throws IOException

Specified by:
  `fieldsProducer` in class `PostingsFormat`
Throws:
  `IOException`

#### createUniformSplitTermsWriter

    protected FieldsConsumer createUniformSplitTermsWriter(PostingsWriterBase postingsWriter,
                                                           SegmentWriteState state,
                                                           int targetNumBlockLines,
                                                           int deltaNumLines,
                                                           BlockEncoder blockEncoder)
                                                    throws IOException

Throws:
  `IOException`

#### createUniformSplitTermsReader

    protected FieldsProducer createUniformSplitTermsReader(PostingsReaderBase postingsReader,
                                                           SegmentReadState state,
                                                           BlockDecoder blockDecoder)
                                                    throws IOException

Throws:
  `IOException`