Package org.elasticsearch.index.mapper
Class MetadataFieldMapper.ConfigurableTypeParser
java.lang.Object
org.elasticsearch.index.mapper.MetadataFieldMapper.ConfigurableTypeParser
- All Implemented Interfaces:
Mapper.TypeParser
,MetadataFieldMapper.TypeParser
- Enclosing class:
- MetadataFieldMapper
public static class MetadataFieldMapper.ConfigurableTypeParser
extends Object
implements MetadataFieldMapper.TypeParser
-
Constructor Summary
ConstructorDescriptionConfigurableTypeParser(Function<MappingParserContext,MetadataFieldMapper> defaultMapperParser, Function<MappingParserContext,MetadataFieldMapper.Builder> builderFunction)
-
Method Summary
Modifier and TypeMethodDescriptiongetDefault(MappingParserContext parserContext)
Get the defaultMetadataFieldMapper
to use, if nothing had to be parsed.
-
Constructor Details
-
ConfigurableTypeParser
public ConfigurableTypeParser(Function<MappingParserContext,MetadataFieldMapper> defaultMapperParser, Function<MappingParserContext,MetadataFieldMapper.Builder> builderFunction)
-
-
Method Details
-
parse
public MetadataFieldMapper.Builder parse(String name, Map<String,Object> node, MappingParserContext parserContext) throws MapperParsingException- Specified by:
parse
in interfaceMapper.TypeParser
- Specified by:
parse
in interfaceMetadataFieldMapper.TypeParser
- Throws:
MapperParsingException
-
getDefault
Description copied from interface:MetadataFieldMapper.TypeParser
Get the defaultMetadataFieldMapper
to use, if nothing had to be parsed.- Specified by:
getDefault
in interfaceMetadataFieldMapper.TypeParser
- Parameters:
parserContext
- context that may be useful to build the field like analyzers
-