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
PostingsFormat based on the Uniform Split technique.- See Also:
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BlockDecoderprotected final BlockEncoderprotected final intprotected final booleanstatic final Stringprotected final intstatic final StringExtension of the file containing the terms blocks for each field and the fields metadata.static final StringExtension of the file containing the terms dictionary (the FST "trie").static final intstatic final intstatic final intFields inherited from class org.apache.lucene.codecs.PostingsFormat
EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreates aUniformSplitPostingsFormatwith default settings.UniformSplitPostingsFormat(int targetNumBlockLines, int deltaNumLines, BlockEncoder blockEncoder, BlockDecoder blockDecoder, boolean dictionaryOnHeap) protectedUniformSplitPostingsFormat(String name, int targetNumBlockLines, int deltaNumLines, BlockEncoder blockEncoder, BlockDecoder blockDecoder, boolean dictionaryOnHeap) -
Method Summary
Modifier and TypeMethodDescriptionprotected FieldsProducercreateUniformSplitTermsReader(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder) protected FieldsConsumercreateUniformSplitTermsWriter(PostingsWriterBase postingsWriter, SegmentWriteState state, int targetNumBlockLines, int deltaNumLines, BlockEncoder blockEncoder) fieldsConsumer(SegmentWriteState state) fieldsProducer(SegmentReadState state) Methods inherited from class org.apache.lucene.codecs.PostingsFormat
availablePostingsFormats, forName, getName, reloadPostingsFormats, toString
-
Field Details
-
TERMS_DICTIONARY_EXTENSION
Extension of the file containing the terms dictionary (the FST "trie").- See Also:
-
TERMS_BLOCKS_EXTENSION
Extension of the file containing the terms blocks for each field and the fields metadata.- See Also:
-
VERSION_START
public static final int VERSION_START- See Also:
-
VERSION_ENCODABLE_FIELDS_METADATA
public static final int VERSION_ENCODABLE_FIELDS_METADATA- See Also:
-
VERSION_CURRENT
public static final int VERSION_CURRENT- See Also:
-
NAME
- See Also:
-
targetNumBlockLines
protected final int targetNumBlockLines -
deltaNumLines
protected final int deltaNumLines -
blockEncoder
-
blockDecoder
-
dictionaryOnHeap
protected final boolean dictionaryOnHeap
-
-
Constructor Details
-
UniformSplitPostingsFormat
public UniformSplitPostingsFormat()Creates aUniformSplitPostingsFormatwith default settings. -
UniformSplitPostingsFormat
public UniformSplitPostingsFormat(int targetNumBlockLines, int deltaNumLines, BlockEncoder blockEncoder, BlockDecoder blockDecoder, boolean dictionaryOnHeap) - Parameters:
targetNumBlockLines- Target number of lines per block. Must be strictly greater than 0. The parameters can be pre-validated withUniformSplitTermsWriter.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 thantargetNumBlockLines. The block size will betargetNumBlockLines+-deltaNumLines. The block size must always be less than or equal toUniformSplitTermsWriter.MAX_NUM_BLOCK_LINES.blockEncoder- Optional block encoder, may be null if none. If present, it is used to encode all terms blocks, as well as the FST dictionary and the fields metadata.blockDecoder- Optional block decoder, may be null if none. If present, it is used to decode all terms blocks, as well as the FST dictionary and the fields metadata.dictionaryOnHeap- Whether to force loading the terms dictionary on-heap. By default it is kept off-heap without impact on performance. If block encoding/decoding is used, then the dictionary is always loaded on-heap whatever this parameter value is.
-
UniformSplitPostingsFormat
protected UniformSplitPostingsFormat(String name, int targetNumBlockLines, int deltaNumLines, BlockEncoder blockEncoder, BlockDecoder blockDecoder, boolean dictionaryOnHeap) - See Also:
-
-
Method Details
-
fieldsConsumer
- Specified by:
fieldsConsumerin classPostingsFormat- Throws:
IOException
-
fieldsProducer
- Specified by:
fieldsProducerin classPostingsFormat- 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
-