Package org.elasticsearch.plugins
Interface MapperPlugin
-
public interface MapperPlugin
An extension point forPlugin
implementations to add custom mappers
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Function<java.lang.String,java.util.function.Predicate<java.lang.String>>
NOOP_FIELD_FILTER
The default field filter applied, which doesn't filter anything.static java.util.function.Predicate<java.lang.String>
NOOP_FIELD_PREDICATE
The default field predicate applied, which doesn't filter anything.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.function.Function<java.lang.String,java.util.function.Predicate<java.lang.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 java.util.Map<java.lang.String,Mapper.TypeParser>
getMappers()
Returns additional mapper implementations added by this plugin.default java.util.Map<java.lang.String,MetadataFieldMapper.TypeParser>
getMetadataMappers()
Returns additional metadata mapper implementations added by this plugin.
-
-
-
Field Detail
-
NOOP_FIELD_PREDICATE
static final java.util.function.Predicate<java.lang.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 java.util.function.Function<java.lang.String,java.util.function.Predicate<java.lang.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 java.util.Map<java.lang.String,Mapper.TypeParser> 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
.
-
getMetadataMappers
default java.util.Map<java.lang.String,MetadataFieldMapper.TypeParser> 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
default java.util.function.Function<java.lang.String,java.util.function.Predicate<java.lang.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.
-
-