java.lang.Object
org.elasticsearch.index.mapper.MapperRegistry
A registry for all field mappers.
-
Constructor Summary
ConstructorsConstructorDescriptionMapperRegistry
(Map<String, Mapper.TypeParser> mapperParsers, Map<String, RuntimeField.Parser> runtimeFieldParsers, Map<String, MetadataFieldMapper.TypeParser> metadataMapperParsers, Function<String, Predicate<String>> fieldFilter) -
Method Summary
Modifier and TypeMethodDescriptionReturns a function that given an index name, returns a predicate that fields must match in order to be returned by get mappings, get index, get field mappings and field capabilities API.getMapperParser
(String type, IndexVersion indexVersionCreated) Return a mapper parser for the given type and index creation version.getMetadataMapperParsers
(IndexVersion indexCreatedVersion) Return a map of the meta mappers that have been registered.
-
Constructor Details
-
MapperRegistry
public MapperRegistry(Map<String, Mapper.TypeParser> mapperParsers, Map<String, RuntimeField.Parser> runtimeFieldParsers, Map<String, MetadataFieldMapper.TypeParser> metadataMapperParsers, Function<String, Predicate<String>> fieldFilter)
-
-
Method Details
-
getMapperParser
Return a mapper parser for the given type and index creation version. -
getRuntimeFieldParsers
-
getMetadataMapperParsers
public Map<String,MetadataFieldMapper.TypeParser> getMetadataMapperParsers(IndexVersion indexCreatedVersion) Return a map of the meta mappers that have been registered. The returned map uses the name of the field as a key. -
getFieldFilter
Returns a function that given an index name, returns a predicate that 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 arguments. In case multiple plugins register a field filter throughMapperPlugin.getFieldFilter()
, only fields that match all the registered filters will be returned by get mappings, get index, get field mappings and field capabilities API.
-