Class PutMappingRequest.Builder
- All Implemented Interfaces:
WithJson<PutMappingRequest.Builder>,ObjectBuilder<PutMappingRequest>
- Enclosing class:
- PutMappingRequest
PutMappingRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowNoIndices(Boolean value) Whether to ignore if a wildcard indices expression resolves into no concrete indices.build()Builds aPutMappingRequest.dateDetection(Boolean value) Controls whether dynamic date detection is enabled.dynamic(DynamicMapping value) Controls whether new fields are added dynamically.dynamicDateFormats(String value, 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.dynamicDateFormats(List<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.dynamicTemplates(List<Map<String, DynamicTemplate>> list) Specify dynamic templates for the mapping.dynamicTemplates(Map<String, DynamicTemplate> value, Map<String, DynamicTemplate>... values) Specify dynamic templates for the mapping.expandWildcards(ExpandWildcard value, ExpandWildcard... values) Whether to expand wildcard expression to concrete indices that are open, closed or both.expandWildcards(List<ExpandWildcard> list) Whether to expand wildcard expression to concrete indices that are open, closed or both.fieldNames(FieldNamesField value) Control whether field names are enabled for the index.Control whether field names are enabled for the index.ignoreUnavailable(Boolean value) Whether specified concrete indices should be ignored when unavailable (missing or closed)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.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.masterTimeout(Time value) Specify timeout for connection to masterSpecify timeout for connection to masterA mapping type can have custom meta data associated with it.A mapping type can have custom meta data associated with it.numericDetection(Boolean value) Automatically map strings into numeric data types for all fields.properties(String key, Property value) Mapping for a field.properties(String key, Function<Property.Builder, ObjectBuilder<Property>> fn) Mapping for a field.properties(Map<String, Property> map) Mapping for a field.routing(RoutingField value) Enable making a routing value required on indexed documents.Enable making a routing value required on indexed documents.runtime(String key, RuntimeField value) Mapping of runtime fields for the index.Mapping of runtime fields for the index.runtime(Map<String, RuntimeField> map) Mapping of runtime fields for the index.protected PutMappingRequest.Builderself()source(SourceField value) Control whether the _source field is enabled on the index.Control whether the _source field is enabled on the index.Explicit operation timeoutExplicit operation timeoutwriteIndexOnly(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, _mapPutAll
-
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(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(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(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
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
Specify dynamic templates for the mapping.API name:
dynamic_templatesAdds all elements of
listtodynamicTemplates. -
dynamicTemplates
public final PutMappingRequest.Builder dynamicTemplates(Map<String, DynamicTemplate> value, Map<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
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(String key, 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
Mapping of runtime fields for the index.API name:
runtimeAdds all entries of
maptoruntime. -
runtime
Mapping of runtime fields for the index.API name:
runtimeAdds an entry to
runtime. -
runtime
public final PutMappingRequest.Builder runtime(String key, Function<RuntimeField.Builder, ObjectBuilder<RuntimeField>> fn) Mapping of runtime fields for the index.API name:
runtimeAdds an entry to
runtimeusing a builder lambda. -
timeout
Explicit operation timeoutAPI name:
timeout -
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 -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<PutMappingRequest.Builder>
-
build
Builds aPutMappingRequest.- Specified by:
buildin interfaceObjectBuilder<PutMappingRequest>- Throws:
NullPointerException- if some of the required fields are null.
-