Class Lucene84Codec

  • All Implemented Interfaces:
    NamedSPILoader.NamedSPI

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

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

    See Also:
    package documentation for file format details.
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • Lucene84Codec

        public Lucene84Codec()
        Instantiates a new codec.
      • Lucene84Codec

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

      • getPostingsFormatForField

        public PostingsFormat getPostingsFormatForField​(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​(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 final NormsFormat normsFormat()
        Description copied from class: Codec
        Encodes/decodes document normalization values
        Specified by:
        normsFormat in class Codec