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, multiFieldsBuilder
Fields inherited from class org.elasticsearch.index.mapper.Mapper.Builder
name
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder(java.lang.String name)
-
Method Summary
Modifier and Type Method Description FieldMapper
build(ContentPath context)
Returns a newly built mapper.protected abstract RuntimeField
createRuntimeField(Mapper.TypeParser.ParserContext parserContext)
protected java.util.List<FieldMapper.Parameter<?>>
getParameters()
FieldMapper.Builder
init(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, toXContent
Methods inherited from class org.elasticsearch.index.mapper.Mapper.Builder
name
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getParameters
in classFieldMapper.Builder
- Returns:
- the list of parameters defined for this mapper
-
init
Description copied from class:FieldMapper.Builder
Initialises all parameters from an existing mapper- Overrides:
init
in classFieldMapper.Builder
-
build
Description copied from class:Mapper.Builder
Returns a newly built mapper.- Specified by:
build
in classFieldMapper.Builder
-
createRuntimeField
-