Class PutMappingRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.indices.PutMappingRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable
public class PutMappingRequest
extends RequestBase
implements JsonpSerializable
Updates the index mappings.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutMappingRequest>
Json deserializer forPutMappingRequest
static final Endpoint<PutMappingRequest,
PutMappingResponse, ErrorResponse> Endpoint "indices.put_mapping
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
Whether to ignore if a wildcard indices expression resolves into no concrete indices.final Boolean
Controls whether dynamic date detection is enabled.final DynamicMapping
dynamic()
Controls whether new fields are added dynamically.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.final List<Map<String,
DynamicTemplate>> Specify dynamic templates for the mapping.final List<ExpandWildcard>
Whether to expand wildcard expression to concrete indices that are open, closed or both.final FieldNamesField
Control whether field names are enabled for the index.final Boolean
Whether specified concrete indices should be ignored when unavailable (missing or closed)index()
Required - A comma-separated list of index names the mapping should be added to (supports wildcards); use_all
or omit to add the mapping on all indices.final Time
Specify timeout for connection to mastermeta()
A mapping type can have custom meta data associated with it.final Boolean
Automatically map strings into numeric data types for all fields.static PutMappingRequest
Mapping for a field.final RoutingField
routing()
Enable making a routing value required on indexed documents.final Map<String,
RuntimeField> runtime()
Mapping of runtime fields for the index.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final SourceField
source()
Control whether the _source field is enabled on the index.final Time
timeout()
Explicit operation timeoutfinal Boolean
When true, applies mappings only to the write index of an alias or data streamMethods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPutMappingRequest
-
_ENDPOINT
Endpoint "indices.put_mapping
".
-
-
Method Details
-
of
public static PutMappingRequest of(Function<PutMappingRequest.Builder, ObjectBuilder<PutMappingRequest>> fn) -
fieldNames
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:
_meta
-
routing
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
-
allowNoIndices
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes_all
string 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_formats
-
dynamicTemplates
Specify dynamic templates for the mapping.API name:
dynamic_templates
-
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
index
Required - A comma-separated list of index names the mapping should be added to (supports wildcards); use_all
or omit to add the mapping on all indices.API name:
index
-
masterTimeout
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:
properties
-
runtime
Mapping of runtime fields for the index.API name:
runtime
-
timeout
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
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupPutMappingRequestDeserializer
protected static void setupPutMappingRequestDeserializer(ObjectDeserializer<PutMappingRequest.Builder> op)
-