public class UniformSplitPostingsFormat extends PostingsFormat
PostingsFormat based on the Uniform Split technique.UniformSplitTermsWriter| Modifier and Type | Field and Description |
|---|---|
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 |
EMPTY| Modifier | Constructor and Description |
|---|---|
|
UniformSplitPostingsFormat() |
|
UniformSplitPostingsFormat(int targetNumBlockLines,
int deltaNumLines,
BlockEncoder blockEncoder,
BlockDecoder blockDecoder) |
protected |
UniformSplitPostingsFormat(String name,
int targetNumBlockLines,
int deltaNumLines,
BlockEncoder blockEncoder,
BlockDecoder blockDecoder) |
| Modifier and Type | Method and Description |
|---|---|
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) |
availablePostingsFormats, forName, getName, reloadPostingsFormats, toStringpublic static final String TERMS_DICTIONARY_EXTENSION
public static final String TERMS_BLOCKS_EXTENSION
public static final int VERSION_CURRENT
public static final String NAME
protected final int targetNumBlockLines
protected final int deltaNumLines
protected final BlockEncoder blockEncoder
protected final BlockDecoder blockDecoder
public UniformSplitPostingsFormat()
public UniformSplitPostingsFormat(int targetNumBlockLines,
int deltaNumLines,
BlockEncoder blockEncoder,
BlockDecoder blockDecoder)
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.protected UniformSplitPostingsFormat(String name, int targetNumBlockLines, int deltaNumLines, BlockEncoder blockEncoder, BlockDecoder blockDecoder)
public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException
fieldsConsumer in class PostingsFormatIOExceptionpublic FieldsProducer fieldsProducer(SegmentReadState state) throws IOException
fieldsProducer in class PostingsFormatIOExceptionprotected FieldsConsumer createUniformSplitTermsWriter(PostingsWriterBase postingsWriter, SegmentWriteState state, int targetNumBlockLines, int deltaNumLines, BlockEncoder blockEncoder) throws IOException
IOExceptionprotected FieldsProducer createUniformSplitTermsReader(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder) throws IOException
IOExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.