Package org.elasticsearch.index.mapper
Class FieldMapper.Builder
java.lang.Object
org.elasticsearch.index.mapper.Mapper.Builder
org.elasticsearch.index.mapper.FieldMapper.Builder
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
- Direct Known Subclasses:
BinaryFieldMapper.Builder
,BooleanFieldMapper.Builder
,CompletionFieldMapper.Builder
,DateFieldMapper.Builder
,FlattenedFieldMapper.Builder
,GeoPointFieldMapper.Builder
,GeoShapeFieldMapper.Builder
,IpFieldMapper.Builder
,KeywordFieldMapper.Builder
,LegacyGeoShapeFieldMapper.Builder
,MetadataFieldMapper.Builder
,NumberFieldMapper.Builder
,RangeFieldMapper.Builder
,TextFieldMapper.Builder
- Enclosing class:
- FieldMapper
public abstract static class FieldMapper.Builder
extends Mapper.Builder
implements org.elasticsearch.common.xcontent.ToXContentFragment
A Builder for a ParametrizedFieldMapper
-
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
Modifier and TypeFieldDescriptionprotected FieldMapper.CopyTo.Builder
protected FieldMapper.MultiFields.Builder
Fields inherited from class org.elasticsearch.index.mapper.Mapper.Builder
name
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addScriptValidation(FieldMapper.Parameter<Script> scriptParam, FieldMapper.Parameter<Boolean> indexParam, FieldMapper.Parameter<Boolean> docValuesParam)
abstract FieldMapper
build(ContentPath context)
Returns a newly built mapper.protected String
buildFullName(ContentPath contentPath)
Builds the full name of the field, taking into account parent objectsprotected abstract List<FieldMapper.Parameter<?>>
init(FieldMapper initializer)
Initialises all parameters from an existing mapperprotected static ContentPath
parentPath(String name)
void
Parse mapping parameters from a map of mappingsorg.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
Writes the current builder parameter values as XContentMethods 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
-
Field Details
-
multiFieldsBuilder
-
copyTo
-
-
Constructor Details
-
Builder
Creates a new Builder with a field name
-
-
Method Details
-
init
Initialises all parameters from an existing mapper -
getParameters
- Returns:
- the list of parameters defined for this mapper
-
build
Description copied from class:Mapper.Builder
Returns a newly built mapper.- Specified by:
build
in classMapper.Builder
-
buildFullName
Builds the full name of the field, taking into account parent objects -
addScriptValidation
protected void addScriptValidation(FieldMapper.Parameter<Script> scriptParam, FieldMapper.Parameter<Boolean> indexParam, FieldMapper.Parameter<Boolean> docValuesParam) -
toXContent
public final org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOExceptionWrites the current builder parameter values as XContent- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
IOException
-
parse
public final void parse(String name, MappingParserContext parserContext, Map<String,Object> fieldNode)Parse mapping parameters from a map of mappings- Parameters:
name
- the field mapper nameparserContext
- the parser contextfieldNode
- the root node of the map of mappings for this field
-
parentPath
-