java.lang.Object
org.apache.lucene.codecs.Codec
org.apache.lucene.codecs.FilterCodec
org.elasticsearch.index.codec.CodecService.DeduplicateFieldInfosCodec
org.elasticsearch.index.codec.Elasticsearch93Lucene104Codec
org.elasticsearch.index.codec.PerFieldMapperCodec
- All Implemented Interfaces:
org.apache.lucene.util.NamedSPILoader.NamedSPI
This Lucene codec provides the default
PostingsFormat and KnnVectorsFormat for Elasticsearch. It utilizes the
MapperService to lookup a PostingsFormat and KnnVectorsFormat per field. This
allows users to change the low level postings format and vectors format for individual fields
per index in real time via the mapping API. If no specific postings format or vector format is
configured for a specific field the default postings or vector format is used.-
Field Summary
Fields inherited from class org.apache.lucene.codecs.FilterCodec
delegate -
Constructor Summary
ConstructorsConstructorDescriptionPerFieldMapperCodec(Zstd814StoredFieldsFormat.Mode compressionMode, MapperService mapperService, BigArrays bigArrays, ThreadPool threadPool) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.codecs.DocValuesFormatgetDocValuesFormatForField(String field) Returns the docvalues format that should be used for writing new segments offield.org.apache.lucene.codecs.KnnVectorsFormatReturns the vectors format that should be used for writing new segments offieldorg.apache.lucene.codecs.PostingsFormatgetPostingsFormatForField(String field) Returns the postings format that should be used for writing new segments offield.Methods inherited from class org.elasticsearch.index.codec.Elasticsearch93Lucene104Codec
docValuesFormat, knnVectorsFormat, postingsFormat, storedFieldsFormatMethods inherited from class org.elasticsearch.index.codec.CodecService.DeduplicateFieldInfosCodec
delegate, fieldInfosFormatMethods inherited from class org.apache.lucene.codecs.FilterCodec
compoundFormat, liveDocsFormat, normsFormat, pointsFormat, segmentInfoFormat, termVectorsFormatMethods inherited from class org.apache.lucene.codecs.Codec
availableCodecs, forName, getDefault, getName, reloadCodecs, setDefault, toString
-
Constructor Details
-
PerFieldMapperCodec
public PerFieldMapperCodec(Zstd814StoredFieldsFormat.Mode compressionMode, MapperService mapperService, BigArrays bigArrays, ThreadPool threadPool)
-
-
Method Details
-
getPostingsFormatForField
Description copied from class:Elasticsearch93Lucene104CodecReturns the postings format that should be used for writing new segments offield.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,
- Overrides:
getPostingsFormatForFieldin classElasticsearch93Lucene104Codec
-
getKnnVectorsFormatForField
Description copied from class:Elasticsearch93Lucene104CodecReturns the vectors format that should be used for writing new segments offieldThe 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.
- Overrides:
getKnnVectorsFormatForFieldin classElasticsearch93Lucene104Codec
-
getDocValuesFormatForField
Description copied from class:Elasticsearch93Lucene104CodecReturns the docvalues format that should be used for writing new segments offield.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.
- Overrides:
getDocValuesFormatForFieldin classElasticsearch93Lucene104Codec
-