Class PutMappingRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<PutMappingRequest>
- Enclosing class:
- PutMappingRequest
public static class PutMappingRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<PutMappingRequest>
PutMappingRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description PutMappingRequest.Builder
allowNoIndices(java.lang.Boolean value)
Whether to ignore if a wildcard indices expression resolves into no concrete indices.PutMappingRequest
build()
Builds aPutMappingRequest
.PutMappingRequest.Builder
dateDetection(java.lang.Boolean value)
Controls whether dynamic date detection is enabled.PutMappingRequest.Builder
dynamic(DynamicMapping value)
Controls whether new fields are added dynamically.PutMappingRequest.Builder
dynamicDateFormats(java.lang.String value, java.lang.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.PutMappingRequest.Builder
dynamicDateFormats(java.util.List<java.lang.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.PutMappingRequest.Builder
dynamicTemplates(java.util.List<java.util.Map<java.lang.String,DynamicTemplate>> list)
Specify dynamic templates for the mapping.PutMappingRequest.Builder
dynamicTemplates(java.util.Map<java.lang.String,DynamicTemplate> value, java.util.Map<java.lang.String,DynamicTemplate>... values)
Specify dynamic templates for the mapping.PutMappingRequest.Builder
expandWildcards(ExpandWildcard value, ExpandWildcard... values)
Whether to expand wildcard expression to concrete indices that are open, closed or both.PutMappingRequest.Builder
expandWildcards(java.util.List<ExpandWildcard> list)
Whether to expand wildcard expression to concrete indices that are open, closed or both.PutMappingRequest.Builder
fieldNames(FieldNamesField value)
Control whether field names are enabled for the index.PutMappingRequest.Builder
fieldNames(java.util.function.Function<FieldNamesField.Builder,ObjectBuilder<FieldNamesField>> fn)
Control whether field names are enabled for the index.PutMappingRequest.Builder
ignoreUnavailable(java.lang.Boolean value)
Whether specified concrete indices should be ignored when unavailable (missing or closed)PutMappingRequest.Builder
includeTypeName(java.lang.Boolean value)
Whether a type should be expected in the body of the mappings.PutMappingRequest.Builder
index(java.lang.String value, java.lang.String... values)
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.PutMappingRequest.Builder
index(java.util.List<java.lang.String> list)
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.PutMappingRequest.Builder
masterTimeout(Time value)
Specify timeout for connection to masterPutMappingRequest.Builder
masterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Specify timeout for connection to masterPutMappingRequest.Builder
meta(java.lang.String key, JsonData value)
A mapping type can have custom meta data associated with it.PutMappingRequest.Builder
meta(java.util.Map<java.lang.String,JsonData> map)
A mapping type can have custom meta data associated with it.PutMappingRequest.Builder
numericDetection(java.lang.Boolean value)
Automatically map strings into numeric data types for all fields.PutMappingRequest.Builder
properties(java.lang.String key, Property value)
Mapping for a field.PutMappingRequest.Builder
properties(java.lang.String key, java.util.function.Function<Property.Builder,ObjectBuilder<Property>> fn)
Mapping for a field.PutMappingRequest.Builder
properties(java.util.Map<java.lang.String,Property> map)
Mapping for a field.PutMappingRequest.Builder
routing(RoutingField value)
Enable making a routing value required on indexed documents.PutMappingRequest.Builder
routing(java.util.function.Function<RoutingField.Builder,ObjectBuilder<RoutingField>> fn)
Enable making a routing value required on indexed documents.PutMappingRequest.Builder
runtime(java.lang.String key, RuntimeField value)
Mapping of runtime fields for the index.PutMappingRequest.Builder
runtime(java.lang.String key, java.util.function.Function<RuntimeField.Builder,ObjectBuilder<RuntimeField>> fn)
Mapping of runtime fields for the index.PutMappingRequest.Builder
runtime(java.util.Map<java.lang.String,RuntimeField> map)
Mapping of runtime fields for the index.PutMappingRequest.Builder
source(SourceField value)
Control whether the _source field is enabled on the index.PutMappingRequest.Builder
source(java.util.function.Function<SourceField.Builder,ObjectBuilder<SourceField>> fn)
Control whether the _source field is enabled on the index.PutMappingRequest.Builder
timeout(Time value)
Explicit operation timeoutPutMappingRequest.Builder
timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Explicit operation timeoutPutMappingRequest.Builder
type(java.lang.String value)
The name of the document typePutMappingRequest.Builder
writeIndexOnly(java.lang.Boolean value)
When true, applies mappings only to the write index of an alias or data streamMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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(java.util.function.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:
_meta
Adds all entries of
map
tometa
. -
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
Adds an entry to
meta
. -
routing
Enable making a routing value required on indexed documents.API name:
_routing
-
routing
public final PutMappingRequest.Builder routing(java.util.function.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(java.util.function.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_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
Adds all elements of
list
todynamicDateFormats
. -
dynamicDateFormats
public final PutMappingRequest.Builder dynamicDateFormats(java.lang.String value, java.lang.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.API name:
dynamic_date_formats
Adds one or more values to
dynamicDateFormats
. -
dynamicTemplates
public final PutMappingRequest.Builder dynamicTemplates(java.util.List<java.util.Map<java.lang.String,DynamicTemplate>> list)Specify dynamic templates for the mapping.API name:
dynamic_templates
Adds all elements of
list
todynamicTemplates
. -
dynamicTemplates
public final PutMappingRequest.Builder dynamicTemplates(java.util.Map<java.lang.String,DynamicTemplate> value, java.util.Map<java.lang.String,DynamicTemplate>... values)Specify dynamic templates for the mapping.API name:
dynamic_templates
Adds one or more values to
dynamicTemplates
. -
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
Adds all elements of
list
toexpandWildcards
. -
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_wildcards
Adds one or more values to
expandWildcards
. -
includeTypeName
Whether a type should be expected in the body of the mappings.API name:
include_type_name
-
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
Adds all elements of
list
toindex
. -
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
Adds one or more values to
index
. -
masterTimeout
Specify timeout for connection to masterAPI name:
master_timeout
-
masterTimeout
public final PutMappingRequest.Builder masterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)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
Adds all entries of
map
toproperties
. -
properties
Mapping for a field. For new fields, this mapping can include:- Field name
- Field data type
- Mapping parameters
API name:
properties
Adds an entry to
properties
. -
properties
public final PutMappingRequest.Builder properties(java.lang.String key, java.util.function.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:
properties
Adds an entry to
properties
using a builder lambda. -
runtime
Mapping of runtime fields for the index.API name:
runtime
Adds all entries of
map
toruntime
. -
runtime
Mapping of runtime fields for the index.API name:
runtime
Adds an entry to
runtime
. -
runtime
public final PutMappingRequest.Builder runtime(java.lang.String key, java.util.function.Function<RuntimeField.Builder,ObjectBuilder<RuntimeField>> fn)Mapping of runtime fields for the index.API name:
runtime
Adds an entry to
runtime
using a builder lambda. -
timeout
Explicit operation timeoutAPI name:
timeout
-
timeout
public final PutMappingRequest.Builder timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Explicit operation timeoutAPI name:
timeout
-
type
The name of the document typeAPI name:
type
-
writeIndexOnly
When true, applies mappings only to the write index of an alias or data streamAPI name:
write_index_only
-
build
Builds aPutMappingRequest
.- Specified by:
build
in interfaceObjectBuilder<PutMappingRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-