Class PutMappingRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.indices.PutMappingRequest
- All Implemented Interfaces:
ElasticsearchCommonRequest
,JsonpSerializable
@JsonpDeserializable public final class PutMappingRequest extends RequestBase implements JsonpSerializable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PutMappingRequest.Builder
Builder forPutMappingRequest
.Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<PutMappingRequest>
_DESERIALIZER
Json deserializer forPutMappingRequest
static Endpoint<PutMappingRequest,PutMappingResponse,ElasticsearchError>
ENDPOINT
Endpoint "indices.put_mapping
". -
Constructor Summary
Constructors Constructor Description PutMappingRequest(PutMappingRequest.Builder builder)
PutMappingRequest(java.util.function.Function<PutMappingRequest.Builder,PutMappingRequest.Builder> fn)
-
Method Summary
Modifier and Type Method Description java.lang.Boolean
allowNoIndices()
Whether to ignore if a wildcard indices expression resolves into no concrete indices.java.lang.Boolean
dateDetection()
Controls whether dynamic date detection is enabled.jakarta.json.JsonValue
dynamic()
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<ExpandWildcardOptions>
expandWildcards()
Whether to expand wildcard expression to concrete indices that are open, closed or both.FieldNamesField
fieldNames()
Control whether field names are enabled for the index.java.lang.Boolean
ignoreUnavailable()
Whether specified concrete indices should be ignored when unavailable (missing or closed)java.lang.Boolean
includeTypeName()
Whether a type should be expected in the body of the mappings.java.util.List<java.lang.String>
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.java.lang.String
masterTimeout()
Specify timeout for connection to masterjava.util.Map<java.lang.String,JsonData>
meta()
A mapping type can have custom meta data associated with it.java.lang.Boolean
numericDetection()
Automatically map strings into numeric data types for all fields.java.util.Map<java.lang.String,Property>
properties()
Mapping for a field.RoutingField
routing()
Enable making a routing value required on indexed documents.java.util.Map<java.lang.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
setupPutMappingRequestDeserializer(DelegatingDeserializer<PutMappingRequest.Builder> op)
SourceField
source()
Control whether the _source field is enabled on the index.java.lang.String
timeout()
Explicit operation timeoutjava.lang.String
type()
The name of the document typejava.lang.Boolean
writeIndexOnly()
When true, applies mappings only to the write index of an alias or data streamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forPutMappingRequest
-
ENDPOINT
Endpoint "indices.put_mapping
".
-
-
Constructor Details
-
PutMappingRequest
-
PutMappingRequest
public PutMappingRequest(java.util.function.Function<PutMappingRequest.Builder,PutMappingRequest.Builder> fn)
-
-
Method Details
-
index
public java.util.List<java.lang.String> 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
-
type
@Nullable public java.lang.String type()The name of the document typeAPI name:
type
-
allowNoIndices
@Nullable public java.lang.Boolean 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
-
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
includeTypeName
@Nullable public java.lang.Boolean includeTypeName()Whether a type should be expected in the body of the mappings.API name:
include_type_name
-
masterTimeout
@Nullable public java.lang.String masterTimeout()Specify timeout for connection to masterAPI name:
master_timeout
-
timeout
@Nullable public java.lang.String timeout()Explicit operation timeoutAPI name:
timeout
-
writeIndexOnly
@Nullable public java.lang.Boolean writeIndexOnly()When true, applies mappings only to the write index of an alias or data streamAPI name:
write_index_only
-
dateDetection
@Nullable public java.lang.Boolean dateDetection()Controls whether dynamic date detection is enabled.API name:
date_detection
-
dynamic
@Nullable public jakarta.json.JsonValue dynamic()Controls whether new fields are added dynamically.API name:
dynamic
-
dynamicDateFormats
@Nullable public 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
@Nullable public java.util.List<java.util.Map<java.lang.String,DynamicTemplate>> dynamicTemplates()Specify dynamic templates for the mapping.API name:
dynamic_templates
-
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
-
numericDetection
@Nullable public java.lang.Boolean 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
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
-
runtime
Mapping of runtime fields for the index.API name:
runtime
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupPutMappingRequestDeserializer
protected static void setupPutMappingRequestDeserializer(DelegatingDeserializer<PutMappingRequest.Builder> op)
-