java.lang.Object
org.elasticsearch.index.mapper.FieldMapper.TypeParser
- All Implemented Interfaces:
Mapper.TypeParser
- Enclosing class:
FieldMapper
TypeParser implementation that automatically handles parsing
-
Constructor Summary
ConstructorsConstructorDescriptionTypeParser(BiFunction<String, MappingParserContext, FieldMapper.Builder> builderFunction) Creates a new TypeParserTypeParser(BiFunction<String, MappingParserContext, FieldMapper.Builder> builderFunction, BiConsumer<String, MappingParserContext> contextValidator) TypeParser(BiFunction<String, MappingParserContext, FieldMapper.Builder> builderFunction, List<BiConsumer<String, MappingParserContext>> contextValidator) -
Method Summary
Modifier and TypeMethodDescriptionbooleansupportsVersion(IndexVersion indexCreatedVersion) Whether we can parse this type on indices with the given index created version.
-
Constructor Details
-
TypeParser
Creates a new TypeParser- Parameters:
builderFunction- a function that produces a Builder from a name and parsercontext
-
TypeParser
public TypeParser(BiFunction<String, MappingParserContext, FieldMapper.Builder> builderFunction, BiConsumer<String, MappingParserContext> contextValidator) -
TypeParser
public TypeParser(BiFunction<String, MappingParserContext, FieldMapper.Builder> builderFunction, List<BiConsumer<String, MappingParserContext>> contextValidator)
-
-
Method Details
-
parse
public FieldMapper.Builder parse(String name, Map<String, Object> node, MappingParserContext parserContext) throws MapperParsingException- Specified by:
parsein interfaceMapper.TypeParser- Throws:
MapperParsingException
-
supportsVersion
Description copied from interface:Mapper.TypeParserWhether we can parse this type on indices with the given index created version.- Specified by:
supportsVersionin interfaceMapper.TypeParser
-