Package org.elasticsearch.plugins
Interface MapperPlugin
-
public interface MapperPluginAn extension point forPluginimplementations to add custom mappers
-
-
Field Summary
Fields Modifier and Type Field Description static Function<String,Predicate<String>>NOOP_FIELD_FILTERThe default field filter applied, which doesn't filter anything.static Predicate<String>NOOP_FIELD_PREDICATEThe default field predicate applied, which doesn't filter anything.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Function<String,Predicate<String>>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.default Map<String,Mapper.TypeParser>getMappers()Returns additional mapper implementations added by this plugin.default Map<String,MetadataFieldMapper.TypeParser>getMetadataMappers()Returns additional metadata mapper implementations added by this plugin.
-
-
-
Field Detail
-
NOOP_FIELD_PREDICATE
static final Predicate<String> 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
static final Function<String,Predicate<String>> 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 Detail
-
getMappers
default Map<String,Mapper.TypeParser> getMappers()
Returns additional mapper implementations added by this plugin.The key of the returned
Mapis the unique name for the mapper which will be used as the mappingtype, and the value is aMapper.TypeParserto parse the mapper settings into aMapper.
-
getMetadataMappers
default Map<String,MetadataFieldMapper.TypeParser> getMetadataMappers()
Returns additional metadata mapper implementations added by this plugin.The key of the returned
Mapis the unique name for the metadata mapper, which is used in the mapping json to configure the metadata mapper, and the value is aMetadataFieldMapper.TypeParserto parse the mapper settings into aMetadataFieldMapper.
-
getFieldFilter
default Function<String,Predicate<String>> 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.
-
-