Class PerFieldMappingPostingFormatCodec

  • All Implemented Interfaces:
    NamedSPILoader.NamedSPI

    public class PerFieldMappingPostingFormatCodec
    extends Lucene84Codec
    This postings format is the default PostingsFormat for Elasticsearch. It utilizes the MapperService to lookup a PostingsFormat per field. This allows users to change the low level postings format for individual fields per index in real time via the mapping API. If no specific postings format is configured for a specific field the default postings format is used.
    • Method Detail

      • getPostingsFormatForField

        public PostingsFormat getPostingsFormatForField​(String field)
        Description copied from class: Lucene84Codec
        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.

        Overrides:
        getPostingsFormatForField in class Lucene84Codec