java.lang.Object
org.apache.lucene.codecs.Codec
org.apache.lucene.codecs.FilterCodec
org.elasticsearch.index.codec.CodecService.DeduplicateFieldInfosCodec
org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec
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) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.codecs.DocValuesFormat
getDocValuesFormatForField
(String field) Returns the docvalues format that should be used for writing new segments offield
.org.apache.lucene.codecs.KnnVectorsFormat
Returns the vectors format that should be used for writing new segments offield
org.apache.lucene.codecs.PostingsFormat
getPostingsFormatForField
(String field) Returns the postings format that should be used for writing new segments offield
.Methods inherited from class org.elasticsearch.index.codec.Elasticsearch900Lucene101Codec
docValuesFormat, knnVectorsFormat, postingsFormat, storedFieldsFormat
Methods inherited from class org.elasticsearch.index.codec.CodecService.DeduplicateFieldInfosCodec
delegate, fieldInfosFormat
Methods inherited from class org.apache.lucene.codecs.FilterCodec
compoundFormat, liveDocsFormat, normsFormat, pointsFormat, segmentInfoFormat, termVectorsFormat
Methods 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)
-
-
Method Details
-
getPostingsFormatForField
Description copied from class:Elasticsearch900Lucene101Codec
Returns 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:
getPostingsFormatForField
in classElasticsearch900Lucene101Codec
-
getKnnVectorsFormatForField
Description copied from class:Elasticsearch900Lucene101Codec
Returns the vectors 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:
getKnnVectorsFormatForField
in classElasticsearch900Lucene101Codec
-
getDocValuesFormatForField
Description copied from class:Elasticsearch900Lucene101Codec
Returns 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:
getDocValuesFormatForField
in classElasticsearch900Lucene101Codec
-