Class PutMappingRequest
java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.indices.PutMappingRequest
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,ToCopyableBuilder<PutMappingRequest.Builder,PutMappingRequest>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public final class PutMappingRequest
extends RequestBase
implements PlainJsonSerializable, ToCopyableBuilder<PutMappingRequest.Builder,PutMappingRequest>
Updates the index mappings.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensearch.client.opensearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutMappingRequest> Json deserializer forPutMappingRequeststatic final Endpoint<PutMappingRequest, PutMappingResponse, ErrorResponse> Endpoint "indices.put_mapping". -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanIffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indexes.protected voidapplyQueryParameters(Map<String, String> params) static PutMappingRequest.Builderbuilder()final TimeOperation timeout for connection to cluster-manager node.final BooleanControls whether dynamic date detection is enabled.final DynamicMappingdynamic()API name:dynamicIf date detection is enabled then new string fields are checked againstdynamic_date_formatsand if the value matches then a new date field is added instead of string.final List<Map<String, DynamicTemplate>> Specify dynamic templates for the mapping.booleanfinal List<ExpandWildcard> Type of index that wildcard patterns can match.final FieldNamesFieldAPI name:_field_namesinthashCode()final BooleanIffalse, the request returns an error if it targets a missing or closed index.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 indexes.final TimeDeprecated.meta()API name:_metafinal BooleanAutomatically map strings into numeric data types for all fields.static PutMappingRequestMapping for a field.final RoutingFieldrouting()API name:_routingvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal SourceFieldsource()API name:_sourcefinal Timetimeout()Period to wait for a response.Create a new builderToCopyableBuilderthat is initialised with the current state of this object.final BooleanIftrue, the mappings are applied only to the current write index for the target.Methods inherited from class org.opensearch.client.opensearch._types.RequestBase
errorTrace, humanMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonStringMethods inherited from interface org.opensearch.client.util.ToCopyableBuilder
copy
-
Field Details
-
_DESERIALIZER
Json deserializer forPutMappingRequest -
_ENDPOINT
Endpoint "indices.put_mapping".
-
-
Method Details
-
of
public static PutMappingRequest of(Function<PutMappingRequest.Builder, ObjectBuilder<PutMappingRequest>> fn) -
allowNoIndices
Iffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indexes. This behavior applies even if the request targets other open indexes.API name:
allow_no_indices -
clusterManagerTimeout
Operation timeout for connection to cluster-manager node.API name:
cluster_manager_timeout -
dateDetection
Controls whether dynamic date detection is enabled.API name:
date_detection -
dynamic
API name:dynamic -
dynamicDateFormats
If date detection is enabled then new string fields are checked againstdynamic_date_formatsand if the value matches then a new date field is added instead of string.API name:
dynamic_date_formats -
dynamicTemplates
Specify dynamic templates for the mapping.API name:
dynamic_templates -
expandWildcards
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden. Valid values are:all,open,closed,hidden,none.API name:
expand_wildcards -
fieldNames
API name:_field_names -
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 indexes.API name:
index -
masterTimeout
Deprecated.Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout -
meta
API name:_meta -
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:
properties -
routing
API name:_routing -
source
API name:_source -
timeout
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout -
writeIndexOnly
Iftrue, the mappings are applied only to the current write index for the target.API name:
write_index_only -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toBuilder
Description copied from interface:ToCopyableBuilderCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<PutMappingRequest.Builder,PutMappingRequest> - Returns:
- a new builder instance.
-
builder
-
setupPutMappingRequestDeserializer
protected static void setupPutMappingRequestDeserializer(ObjectDeserializer<PutMappingRequest.Builder> op) -
applyQueryParameters
- Overrides:
applyQueryParametersin classRequestBase
-
hashCode
public int hashCode() -
equals
-