Package org.elasticsearch.index.mapper
Class RuntimeField.Builder
java.lang.Object
org.elasticsearch.index.mapper.Mapper.Builder
org.elasticsearch.index.mapper.FieldMapper.Builder
org.elasticsearch.index.mapper.RuntimeField.Builder
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentFragment
- Enclosing interface:
- RuntimeField
public abstract static class RuntimeField.Builder extends FieldMapper.Builder
For runtime fields the
RuntimeField.Parser returns directly the MappedFieldType.
Internally we still create a RuntimeField.Builder so we reuse the FieldMapper.Parameter infrastructure,
but init(FieldMapper) and build(ContentPath) are never called as
RuntimeField.Parser.parse(String, Map, Mapper.TypeParser.ParserContext) calls
FieldMapper.Builder.parse(String, Mapper.TypeParser.ParserContext, Map) and returns the corresponding
MappedFieldType.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params -
Field Summary
Fields inherited from class org.elasticsearch.index.mapper.FieldMapper.Builder
copyTo, multiFieldsBuilderFields inherited from class org.elasticsearch.index.mapper.Mapper.Builder
nameFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder(java.lang.String name) -
Method Summary
Modifier and Type Method Description FieldMapperbuild(ContentPath context)Returns a newly built mapper.protected abstract RuntimeFieldcreateRuntimeField(Mapper.TypeParser.ParserContext parserContext)protected java.util.List<FieldMapper.Parameter<?>>getParameters()FieldMapper.Builderinit(FieldMapper initializer)Initialises all parameters from an existing mapperjava.util.Map<java.lang.String,java.lang.String>meta()Methods inherited from class org.elasticsearch.index.mapper.FieldMapper.Builder
addScriptValidation, buildFullName, parentPath, parse, toXContentMethods inherited from class org.elasticsearch.index.mapper.Mapper.Builder
nameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
Builder
protected Builder(java.lang.String name)
-
-
Method Details
-
meta
public java.util.Map<java.lang.String,java.lang.String> meta() -
getParameters
- Specified by:
getParametersin classFieldMapper.Builder- Returns:
- the list of parameters defined for this mapper
-
init
Description copied from class:FieldMapper.BuilderInitialises all parameters from an existing mapper- Overrides:
initin classFieldMapper.Builder
-
build
Description copied from class:Mapper.BuilderReturns a newly built mapper.- Specified by:
buildin classFieldMapper.Builder
-
createRuntimeField
-