Class UniformSplitPostingsFormat

    • Field Detail

      • TERMS_DICTIONARY_EXTENSION

        public static final java.lang.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 java.lang.String TERMS_BLOCKS_EXTENSION
        Extension of the file containing the terms blocks for each field and the fields metadata.
        See Also:
        Constant Field Values
      • targetNumBlockLines

        protected final int targetNumBlockLines
      • deltaNumLines

        protected final int deltaNumLines
    • 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​(java.lang.String name,
                                             int targetNumBlockLines,
                                             int deltaNumLines,
                                             BlockEncoder blockEncoder,
                                             BlockDecoder blockDecoder)
    • Method Detail

      • fieldsProducer

        public FieldsProducer fieldsProducer​(SegmentReadState state)
                                      throws java.io.IOException
        Description copied from class: PostingsFormat
        Reads a segment. NOTE: by the time this call returns, it must hold open any files it will need to use; else, those files may be deleted. Additionally, required files may be deleted during the execution of this call before there is a chance to open them. Under these circumstances an IOException should be thrown by the implementation. IOExceptions are expected and will automatically cause a retry of the segment opening logic with the newly revised segments.
        Specified by:
        fieldsProducer in class PostingsFormat
        Throws:
        java.io.IOException
      • validateBlockEncoder

        private static void validateBlockEncoder​(BlockEncoder blockEncoder,
                                                 BlockDecoder blockDecoder)