Class PutMappingRequest
- java.lang.Object
-
- org.opensearch.client.opensearch._types.RequestBase
-
- org.opensearch.client.opensearch.indices.PutMappingRequest
-
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class PutMappingRequest extends RequestBase implements JsonpSerializable
Updates the index mappings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPutMappingRequest.BuilderBuilder forPutMappingRequest.-
Nested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<PutMappingRequest>_DESERIALIZERJson deserializer forPutMappingRequeststatic Endpoint<PutMappingRequest,PutMappingResponse,ErrorResponse>_ENDPOINTEndpoint "indices.put_mapping".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.BooleanallowNoIndices()Whether to ignore if a wildcard indices expression resolves into no concrete indices.TimeclusterManagerTimeout()Specify timeout for connection to cluster-managerjava.lang.BooleandateDetection()Controls whether dynamic date detection is enabled.DynamicMappingdynamic()Controls whether new fields are added dynamically.java.util.List<java.lang.String>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.java.util.List<java.util.Map<java.lang.String,DynamicTemplate>>dynamicTemplates()Specify dynamic templates for the mapping.java.util.List<ExpandWildcard>expandWildcards()Whether to expand wildcard expression to concrete indices that are open, closed or both.FieldNamesFieldfieldNames()Control whether field names are enabled for the index.java.lang.BooleanignoreUnavailable()Whether specified concrete indices should be ignored when unavailable (missing or closed)java.util.List<java.lang.String>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.TimemasterTimeout()Deprecated.java.util.Map<java.lang.String,JsonData>meta()A mapping type can have custom meta data associated with it.java.lang.BooleannumericDetection()Automatically map strings into numeric data types for all fields.static PutMappingRequestof(java.util.function.Function<PutMappingRequest.Builder,ObjectBuilder<PutMappingRequest>> fn)java.util.Map<java.lang.String,Property>properties()Mapping for a field.RoutingFieldrouting()Enable making a routing value required on indexed documents.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupPutMappingRequestDeserializer(ObjectDeserializer<PutMappingRequest.Builder> op)SourceFieldsource()Control whether the _source field is enabled on the index.Timetimeout()Explicit operation timeoutjava.lang.BooleanwriteIndexOnly()When true, applies mappings only to the write index of an alias or data stream
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<PutMappingRequest> _DESERIALIZER
Json deserializer forPutMappingRequest
-
_ENDPOINT
public static final Endpoint<PutMappingRequest,PutMappingResponse,ErrorResponse> _ENDPOINT
Endpoint "indices.put_mapping".
-
-
Method Detail
-
of
public static PutMappingRequest of(java.util.function.Function<PutMappingRequest.Builder,ObjectBuilder<PutMappingRequest>> fn)
-
fieldNames
@Nullable public final FieldNamesField fieldNames()
Control whether field names are enabled for the index.API name:
_field_names
-
meta
public final java.util.Map<java.lang.String,JsonData> 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:
_meta
-
routing
@Nullable public final RoutingField routing()
Enable making a routing value required on indexed documents.API name:
_routing
-
source
@Nullable public final SourceField source()
Control whether the _source field is enabled on the index.API name:
_source
-
allowNoIndices
@Nullable public final java.lang.Boolean 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
@Nullable public final java.lang.Boolean dateDetection()
Controls whether dynamic date detection is enabled.API name:
date_detection
-
dynamic
@Nullable public final DynamicMapping dynamic()
Controls whether new fields are added dynamically.API name:
dynamic
-
dynamicDateFormats
public final java.util.List<java.lang.String> 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_formats
-
dynamicTemplates
public final java.util.List<java.util.Map<java.lang.String,DynamicTemplate>> dynamicTemplates()
Specify dynamic templates for the mapping.API name:
dynamic_templates
-
expandWildcards
public final java.util.List<ExpandWildcard> expandWildcards()
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
ignoreUnavailable
@Nullable public final java.lang.Boolean ignoreUnavailable()
Whether specified concrete indices should be ignored when unavailable (missing or closed)API name:
ignore_unavailable
-
index
public final java.util.List<java.lang.String> 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:
index
-
masterTimeout
@Deprecated @Nullable public final Time masterTimeout()
Deprecated.Specify timeout for connection to masterAPI name:
master_timeout
-
clusterManagerTimeout
@Nullable public final Time clusterManagerTimeout()
Specify timeout for connection to cluster-managerAPI name:
cluster_manager_timeout
-
numericDetection
@Nullable public final java.lang.Boolean numericDetection()
Automatically map strings into numeric data types for all fields.API name:
numeric_detection
-
properties
public final java.util.Map<java.lang.String,Property> properties()
Mapping for a field. For new fields, this mapping can include:- Field name
- Field data type
- Mapping parameters
API name:
properties
-
timeout
@Nullable public final Time timeout()
Explicit operation timeoutAPI name:
timeout
-
writeIndexOnly
@Nullable public final java.lang.Boolean writeIndexOnly()
When true, applies mappings only to the write index of an alias or data streamAPI name:
write_index_only
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
setupPutMappingRequestDeserializer
protected static void setupPutMappingRequestDeserializer(ObjectDeserializer<PutMappingRequest.Builder> op)
-
-