Class PutMappingRequest.Builder
- All Implemented Interfaces:
CopyableBuilder<PutMappingRequest.Builder,,PutMappingRequest> MutableBuilder<PutMappingRequest.Builder,,PutMappingRequest> ObjectBuilder<PutMappingRequest>
- Enclosing class:
PutMappingRequest
PutMappingRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowNoIndices(Boolean value) Iffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indexes.build()Builds aPutMappingRequest.Operation timeout for connection to cluster-manager node.clusterManagerTimeout(Time value) Operation timeout for connection to cluster-manager node.copy()Create a new builderCopyableBuilderthat is a copy of this one.dateDetection(Boolean value) Controls whether dynamic date detection is enabled.dynamic(DynamicMapping value) API name:dynamicdynamicDateFormats(String value, String... values) 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.dynamicDateFormats(List<String> list) 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.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(List<ExpandWildcard> list) Type of index that wildcard patterns can match.expandWildcards(ExpandWildcard value, ExpandWildcard... values) Type of index that wildcard patterns can match.API name:_field_namesfieldNames(FieldNamesField value) API name:_field_namesignoreUnavailable(Boolean value) Iffalse, the request returns an error if it targets a missing or closed 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.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.Deprecated.masterTimeout(Time value) Deprecated.API name:_metaAPI name:_metanumericDetection(Boolean value) Automatically map strings into numeric data types for all fields.properties(String key, Function<Property.Builder, ObjectBuilder<Property>> fn) Mapping for a field.properties(String key, Property value) Mapping for a field.properties(Map<String, Property> map) Mapping for a field.API name:_routingrouting(RoutingField value) API name:_routingprotected PutMappingRequest.Builderself()API name:_sourcesource(SourceField value) API name:_sourcePeriod to wait for a response.Period to wait for a response.writeIndexOnly(Boolean value) Iftrue, the mappings are applied only to the current write index for the target.Methods inherited from class org.opensearch.client.opensearch._types.RequestBase.AbstractBuilder
errorTrace, humanMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<PutMappingRequest.Builder,PutMappingRequest> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classRequestBase.AbstractBuilder<PutMappingRequest.Builder>
-
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 -
clusterManagerTimeout
@Nonnull public final PutMappingRequest.Builder clusterManagerTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) 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_formatsAdds all elements of
listtodynamicDateFormats. -
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_formatsAdds one or more values to
dynamicDateFormats. -
dynamicTemplates
@Nonnull public final PutMappingRequest.Builder dynamicTemplates(List<Map<String, DynamicTemplate>> list) Specify dynamic templates for the mapping.API name:
dynamic_templatesAdds all elements of
listtodynamicTemplates. -
dynamicTemplates
@Nonnull 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
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_wildcardsAdds all elements of
listtoexpandWildcards. -
expandWildcards
@Nonnull public final PutMappingRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values) 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_wildcardsAdds one or more values to
expandWildcards. -
fieldNames
API name:_field_names -
fieldNames
@Nonnull public final PutMappingRequest.Builder fieldNames(Function<FieldNamesField.Builder, ObjectBuilder<FieldNamesField>> fn) 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:
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 indexes.API name:
indexAdds one or more values to
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 -
masterTimeout
@Deprecated @Nonnull public final PutMappingRequest.Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) 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:_metaAdds all elements of
maptometa. -
meta
API name:_metaAdds an entry to
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:
propertiesAdds all elements 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
@Nonnull 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 a value to
propertiesusing a builder lambda. -
routing
API name:_routing -
routing
@Nonnull public final PutMappingRequest.Builder routing(Function<RoutingField.Builder, ObjectBuilder<RoutingField>> fn) API name:_routing -
source
API name:_source -
source
@Nonnull public final PutMappingRequest.Builder source(Function<SourceField.Builder, ObjectBuilder<SourceField>> fn) 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 -
timeout
@Nonnull public final PutMappingRequest.Builder timeout(Function<Time.Builder, ObjectBuilder<Time>> fn) 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 -
build
Builds aPutMappingRequest.- Specified by:
buildin interfaceObjectBuilder<PutMappingRequest>- Throws:
NullPointerException- if some of the required fields are null.
-