Class PutMappingRequest.Builder
- All Implemented Interfaces:
WithJson<PutMappingRequest.Builder>,ObjectBuilder<PutMappingRequest>
- Enclosing class:
- PutMappingRequest
public static class PutMappingRequest.Builder extends WithJsonObjectBuilderBase<PutMappingRequest.Builder> implements ObjectBuilder<PutMappingRequest>
PutMappingRequest.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description PutMappingRequest.BuilderallowNoIndices(java.lang.Boolean value)Whether to ignore if a wildcard indices expression resolves into no concrete indices.PutMappingRequestbuild()Builds aPutMappingRequest.PutMappingRequest.BuilderdateDetection(java.lang.Boolean value)Controls whether dynamic date detection is enabled.PutMappingRequest.Builderdynamic(DynamicMapping value)Controls whether new fields are added dynamically.PutMappingRequest.BuilderdynamicDateFormats(java.lang.String value, java.lang.String... values)If date detection is enabled then new string fields are checked against 'dynamic_date_formats' and if the value matches then a new date field is added instead of string.PutMappingRequest.BuilderdynamicDateFormats(java.util.List<java.lang.String> list)If date detection is enabled then new string fields are checked against 'dynamic_date_formats' and if the value matches then a new date field is added instead of string.PutMappingRequest.BuilderdynamicTemplates(java.util.List<java.util.Map<java.lang.String,DynamicTemplate>> list)Specify dynamic templates for the mapping.PutMappingRequest.BuilderdynamicTemplates(java.util.Map<java.lang.String,DynamicTemplate> value, java.util.Map<java.lang.String,DynamicTemplate>... values)Specify dynamic templates for the mapping.PutMappingRequest.BuilderexpandWildcards(ExpandWildcard value, ExpandWildcard... values)Whether to expand wildcard expression to concrete indices that are open, closed or both.PutMappingRequest.BuilderexpandWildcards(java.util.List<ExpandWildcard> list)Whether to expand wildcard expression to concrete indices that are open, closed or both.PutMappingRequest.BuilderfieldNames(FieldNamesField value)Control whether field names are enabled for the index.PutMappingRequest.BuilderfieldNames(java.util.function.Function<FieldNamesField.Builder,ObjectBuilder<FieldNamesField>> fn)Control whether field names are enabled for the index.PutMappingRequest.BuilderignoreUnavailable(java.lang.Boolean value)Whether specified concrete indices should be ignored when unavailable (missing or closed)PutMappingRequest.Builderindex(java.lang.String value, java.lang.String... values)Required - A comma-separated list of index names the mapping should be added to (supports wildcards); use_allor omit to add the mapping on all indices.PutMappingRequest.Builderindex(java.util.List<java.lang.String> list)Required - A comma-separated list of index names the mapping should be added to (supports wildcards); use_allor omit to add the mapping on all indices.PutMappingRequest.BuildermasterTimeout(Time value)Specify timeout for connection to masterPutMappingRequest.BuildermasterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Specify timeout for connection to masterPutMappingRequest.Buildermeta(java.lang.String key, JsonData value)A mapping type can have custom meta data associated with it.PutMappingRequest.Buildermeta(java.util.Map<java.lang.String,JsonData> map)A mapping type can have custom meta data associated with it.PutMappingRequest.BuildernumericDetection(java.lang.Boolean value)Automatically map strings into numeric data types for all fields.PutMappingRequest.Builderproperties(java.lang.String key, Property value)Mapping for a field.PutMappingRequest.Builderproperties(java.lang.String key, java.util.function.Function<Property.Builder,ObjectBuilder<Property>> fn)Mapping for a field.PutMappingRequest.Builderproperties(java.util.Map<java.lang.String,Property> map)Mapping for a field.PutMappingRequest.Builderrouting(RoutingField value)Enable making a routing value required on indexed documents.PutMappingRequest.Builderrouting(java.util.function.Function<RoutingField.Builder,ObjectBuilder<RoutingField>> fn)Enable making a routing value required on indexed documents.PutMappingRequest.Builderruntime(java.lang.String key, java.util.List<RuntimeField> value)Mapping of runtime fields for the index.PutMappingRequest.Builderruntime(java.util.Map<java.lang.String,java.util.List<RuntimeField>> map)Mapping of runtime fields for the index.protected PutMappingRequest.Builderself()PutMappingRequest.Buildersource(SourceField value)Control whether the _source field is enabled on the index.PutMappingRequest.Buildersource(java.util.function.Function<SourceField.Builder,ObjectBuilder<SourceField>> fn)Control whether the _source field is enabled on the index.PutMappingRequest.Buildertimeout(Time value)Explicit operation timeoutPutMappingRequest.Buildertimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Explicit operation timeoutPutMappingRequest.BuilderwriteIndexOnly(java.lang.Boolean value)When true, applies mappings only to the write index of an alias or data streamMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
fieldNames
Control whether field names are enabled for the index.API name:
_field_names -
fieldNames
public final PutMappingRequest.Builder fieldNames(java.util.function.Function<FieldNamesField.Builder,ObjectBuilder<FieldNamesField>> fn)Control whether field names are enabled for the index.API name:
_field_names -
meta
A mapping type can have custom meta data associated with it. These are not used at all by Elasticsearch, but can be used to store application-specific metadata.API name:
_metaAdds all entries of
maptometa. -
meta
A mapping type can have custom meta data associated with it. These are not used at all by Elasticsearch, but can be used to store application-specific metadata.API name:
_metaAdds an entry to
meta. -
routing
Enable making a routing value required on indexed documents.API name:
_routing -
routing
public final PutMappingRequest.Builder routing(java.util.function.Function<RoutingField.Builder,ObjectBuilder<RoutingField>> fn)Enable making a routing value required on indexed documents.API name:
_routing -
source
Control whether the _source field is enabled on the index.API name:
_source -
source
public final PutMappingRequest.Builder source(java.util.function.Function<SourceField.Builder,ObjectBuilder<SourceField>> fn)Control whether the _source field is enabled on the index.API name:
_source -
allowNoIndices
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes_allstring or when no indices have been specified)API name:
allow_no_indices -
dateDetection
Controls whether dynamic date detection is enabled.API name:
date_detection -
dynamic
Controls whether new fields are added dynamically.API name:
dynamic -
dynamicDateFormats
If date detection is enabled then new string fields are checked against 'dynamic_date_formats' and if the value matches then a new date field is added instead of string.API name:
dynamic_date_formatsAdds all elements of
listtodynamicDateFormats. -
dynamicDateFormats
public final PutMappingRequest.Builder dynamicDateFormats(java.lang.String value, java.lang.String... values)If date detection is enabled then new string fields are checked against 'dynamic_date_formats' and if the value matches then a new date field is added instead of string.API name:
dynamic_date_formatsAdds one or more values to
dynamicDateFormats. -
dynamicTemplates
public final PutMappingRequest.Builder dynamicTemplates(java.util.List<java.util.Map<java.lang.String,DynamicTemplate>> list)Specify dynamic templates for the mapping.API name:
dynamic_templatesAdds all elements of
listtodynamicTemplates. -
dynamicTemplates
public final PutMappingRequest.Builder dynamicTemplates(java.util.Map<java.lang.String,DynamicTemplate> value, java.util.Map<java.lang.String,DynamicTemplate>... values)Specify dynamic templates for the mapping.API name:
dynamic_templatesAdds one or more values to
dynamicTemplates. -
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcardsAdds all elements of
listtoexpandWildcards. -
expandWildcards
public final PutMappingRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcardsAdds one or more values to
expandWildcards. -
index
Required - A comma-separated list of index names the mapping should be added to (supports wildcards); use_allor omit to add the mapping on all indices.API name:
indexAdds all elements of
listtoindex. -
index
Required - A comma-separated list of index names the mapping should be added to (supports wildcards); use_allor omit to add the mapping on all indices.API name:
indexAdds one or more values to
index. -
masterTimeout
Specify timeout for connection to masterAPI name:
master_timeout -
masterTimeout
public final PutMappingRequest.Builder masterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Specify timeout for connection to masterAPI name:
master_timeout -
numericDetection
Automatically map strings into numeric data types for all fields.API name:
numeric_detection -
properties
Mapping for a field. For new fields, this mapping can include:- Field name
- Field data type
- Mapping parameters
API name:
propertiesAdds all entries of
maptoproperties. -
properties
Mapping for a field. For new fields, this mapping can include:- Field name
- Field data type
- Mapping parameters
API name:
propertiesAdds an entry to
properties. -
properties
public final PutMappingRequest.Builder properties(java.lang.String key, java.util.function.Function<Property.Builder,ObjectBuilder<Property>> fn)Mapping for a field. For new fields, this mapping can include:- Field name
- Field data type
- Mapping parameters
API name:
propertiesAdds an entry to
propertiesusing a builder lambda. -
runtime
public final PutMappingRequest.Builder runtime(java.util.Map<java.lang.String,java.util.List<RuntimeField>> map)Mapping of runtime fields for the index.API name:
runtimeAdds all entries of
maptoruntime. -
runtime
public final PutMappingRequest.Builder runtime(java.lang.String key, java.util.List<RuntimeField> value)Mapping of runtime fields for the index.API name:
runtimeAdds an entry to
runtime. -
timeout
Explicit operation timeoutAPI name:
timeout -
timeout
public final PutMappingRequest.Builder timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Explicit operation timeoutAPI name:
timeout -
writeIndexOnly
When true, applies mappings only to the write index of an alias or data streamAPI name:
write_index_only -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<PutMappingRequest.Builder>
-
build
Builds aPutMappingRequest.- Specified by:
buildin interfaceObjectBuilder<PutMappingRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-