Package org.elasticsearch.index.mapper
Class FieldMapper.TypeParser
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
ConstructorDescriptionTypeParser
(BiFunction<String, MappingParserContext, FieldMapper.Builder> builderFunction) Creates a new TypeParserTypeParser
(BiFunction<String, MappingParserContext, FieldMapper.Builder> builderFunction, BiConsumer<String, MappingParserContext> contextValidator) -
Method Summary
Modifier and TypeMethodDescription
-
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)
-
-
Method Details
-
parse
public FieldMapper.Builder parse(String name, Map<String, Object> node, MappingParserContext parserContext) throws MapperParsingException- Specified by:
parse
in interfaceMapper.TypeParser
- Throws:
MapperParsingException
-