Class Elasticsearch816Codec

java.lang.Object
org.apache.lucene.codecs.Codec
org.apache.lucene.codecs.FilterCodec
org.elasticsearch.index.codec.CodecService.DeduplicateFieldInfosCodec
org.elasticsearch.index.codec.Elasticsearch816Codec
All Implemented Interfaces:
org.apache.lucene.util.NamedSPILoader.NamedSPI

public class Elasticsearch816Codec extends CodecService.DeduplicateFieldInfosCodec
Elasticsearch codec as of 8.16. This extends the Lucene 9.12 codec to compressed stored fields with ZSTD instead of LZ4/DEFLATE. See Zstd814StoredFieldsFormat.
  • Constructor Details

    • Elasticsearch816Codec

      public Elasticsearch816Codec()
      Public no-arg constructor, needed for SPI loading at read-time.
    • Elasticsearch816Codec

      public Elasticsearch816Codec(Zstd814StoredFieldsFormat.Mode mode)
      Constructor. Takes a Zstd814StoredFieldsFormat.Mode that describes whether to optimize for retrieval speed at the expense of worse space-efficiency or vice-versa.
  • Method Details

    • storedFieldsFormat

      public org.apache.lucene.codecs.StoredFieldsFormat storedFieldsFormat()
      Overrides:
      storedFieldsFormat in class org.apache.lucene.codecs.FilterCodec
    • postingsFormat

      public final org.apache.lucene.codecs.PostingsFormat postingsFormat()
      Overrides:
      postingsFormat in class org.apache.lucene.codecs.FilterCodec
    • docValuesFormat

      public final org.apache.lucene.codecs.DocValuesFormat docValuesFormat()
      Overrides:
      docValuesFormat in class org.apache.lucene.codecs.FilterCodec
    • knnVectorsFormat

      public final org.apache.lucene.codecs.KnnVectorsFormat knnVectorsFormat()
      Overrides:
      knnVectorsFormat in class org.apache.lucene.codecs.FilterCodec
    • getPostingsFormatForField

      public org.apache.lucene.codecs.PostingsFormat getPostingsFormatForField(String field)
      Returns the postings format that should be used for writing new segments of field.

      The default implementation always returns "Lucene912".

      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 org.apache.lucene.codecs.DocValuesFormat getDocValuesFormatForField(String field)
      Returns the docvalues format that should be used for writing new segments of field .

      The default implementation always returns "Lucene912".

      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.

    • getKnnVectorsFormatForField

      public org.apache.lucene.codecs.KnnVectorsFormat getKnnVectorsFormatForField(String field)
      Returns the vectors format that should be used for writing new segments of field

      The default implementation always returns "Lucene912".

      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.