Package org.elasticsearch.plugins
Interface MapperPlugin
public interface MapperPlugin
An extension point for
Plugin
implementations to add custom mappers-
Field Summary
Modifier and TypeFieldDescriptionThe default field filter applied, which doesn't filter anything.The default field predicate applied, which doesn't filter anything. -
Method Summary
Modifier and TypeMethodDescriptionReturns a function that given an index name returns a predicate which fields must match in order to be returned by get mappings, get index, get field mappings and field capabilities API.default Map<String,Mapper.TypeParser>
Returns additional mapper implementations added by this plugin.default Map<String,MetadataFieldMapper.TypeParser>
Returns additional metadata mapper implementations added by this plugin.default Map<String,RuntimeField.Parser>
Returns the runtime field implementations added by this plugin.
-
Field Details
-
NOOP_FIELD_PREDICATE
The default field predicate applied, which doesn't filter anything. That means that by default get mappings, get index get field mappings and field capabilities API will return every field that's present in the mappings. -
NOOP_FIELD_FILTER
The default field filter applied, which doesn't filter anything. That means that by default get mappings, get index get field mappings and field capabilities API will return every field that's present in the mappings.
-
-
Method Details
-
getMappers
Returns additional mapper implementations added by this plugin.The key of the returned
Map
is the unique name for the mapper which will be used as the mappingtype
, and the value is aMapper.TypeParser
to parse the mapper settings into aMapper
. -
getRuntimeFields
Returns the runtime field implementations added by this plugin.The key of the returned
Map
is the unique name for the field type which will be used as the mappingtype
, and the value is aRuntimeField.Parser
to parse the field type settings into aRuntimeField
. -
getMetadataMappers
Returns additional metadata mapper implementations added by this plugin.The key of the returned
Map
is the unique name for the metadata mapper, which is used in the mapping json to configure the metadata mapper, and the value is aMetadataFieldMapper.TypeParser
to parse the mapper settings into aMetadataFieldMapper
. -
getFieldFilter
Returns a function that given an index name returns a predicate which fields must match in order to be returned by get mappings, get index, get field mappings and field capabilities API. Useful to filter the fields that such API return. The predicate receives the field name as input argument and should return true to show the field and false to hide it.
-