Class Lucene87Codec

  • All Implemented Interfaces:
    NamedSPILoader.NamedSPI

    public class Lucene87Codec
    extends Codec
    Implements the Lucene 8.6 index format, with configurable per-field postings and docvalues formats.

    If you want to reuse functionality of this codec in another codec, extend FilterCodec.

    • Constructor Detail

      • Lucene87Codec

        public Lucene87Codec()
        Instantiates a new codec.
      • Lucene87Codec

        public Lucene87Codec​(Lucene87Codec.Mode mode)
        Instantiates a new codec, specifying the compression mode to use.
        Parameters:
        mode - compression mode to use for newly flushed/merged segments.
    • Method Detail

      • getPostingsFormatForField

        public PostingsFormat getPostingsFormatForField​(java.lang.String field)
        Returns the postings format that should be used for writing new segments of field.

        The default implementation always returns "Lucene84".

        WARNING: if you subclass, you are responsible for index backwards compatibility: future version of Lucene are only guaranteed to be able to read the default implementation.

      • getDocValuesFormatForField

        public DocValuesFormat getDocValuesFormatForField​(java.lang.String field)
        Returns the docvalues format that should be used for writing new segments of field .

        The default implementation always returns "Lucene80".

        WARNING: if you subclass, you are responsible for index backwards compatibility: future version of Lucene are only guaranteed to be able to read the default implementation.

      • normsFormat

        public NormsFormat normsFormat()
        Description copied from class: Codec
        Encodes/decodes document normalization values
        Specified by:
        normsFormat in class Codec