Package org.elasticsearch.index.codec
Class PerFieldMappingPostingFormatCodec
- java.lang.Object
-
- org.apache.lucene.codecs.Codec
-
- org.apache.lucene.codecs.lucene84.Lucene84Codec
-
- org.elasticsearch.index.codec.PerFieldMappingPostingFormatCodec
-
- All Implemented Interfaces:
NamedSPILoader.NamedSPI
public class PerFieldMappingPostingFormatCodec extends Lucene84Codec
This postings formatis the defaultPostingsFormatfor Elasticsearch. It utilizes theMapperServiceto lookup aPostingsFormatper 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.
-
-
Constructor Summary
Constructors Constructor Description PerFieldMappingPostingFormatCodec(Lucene50StoredFieldsFormat.Mode compressionMode, MapperService mapperService, org.apache.logging.log4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PostingsFormatgetPostingsFormatForField(String field)Returns the postings format that should be used for writing new segments offield.-
Methods inherited from class org.apache.lucene.codecs.lucene84.Lucene84Codec
compoundFormat, docValuesFormat, fieldInfosFormat, getDocValuesFormatForField, liveDocsFormat, normsFormat, pointsFormat, postingsFormat, segmentInfoFormat, storedFieldsFormat, termVectorsFormat
-
Methods inherited from class org.apache.lucene.codecs.Codec
availableCodecs, forName, getDefault, getName, reloadCodecs, setDefault, toString
-
-
-
-
Constructor Detail
-
PerFieldMappingPostingFormatCodec
public PerFieldMappingPostingFormatCodec(Lucene50StoredFieldsFormat.Mode compressionMode, MapperService mapperService, org.apache.logging.log4j.Logger logger)
-
-
Method Detail
-
getPostingsFormatForField
public PostingsFormat getPostingsFormatForField(String field)
Description copied from class:Lucene84CodecReturns the postings format that should be used for writing new segments offield. 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:
getPostingsFormatForFieldin classLucene84Codec
-
-