Update index settings
Changes dynamic index settings in real time. For data streams, index setting changes are applied to all backing indices by default.
Path parameters
-
Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (
*
). To target all data streams and indices, omit this parameter or use*
or_all
.
Query parameters
-
allow_no_indices boolean
If
false
, the request returns an error if any wildcard expression, index alias, or_all
value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targetingfoo*,bar*
returns an error if an index starts withfoo
but no index starts withbar
. -
expand_wildcards string | array[string]
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 as
open,hidden
. -
flat_settings boolean
If
true
, returns settings in flat format. -
master_timeout string
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
-
preserve_existing boolean
If
true
, existing index settings remain unchanged. -
timeout string
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Body Required
-
Additional properties are allowed.
-
mode string
routing_path string | array[string]
-
soft_deletes object
Additional properties are allowed.
-
sort object
Additional properties are allowed.
number_of_shards number | string
number_of_replicas number | string
-
number_of_routing_shards number
-
check_on_startup string
Values are
true
,false
, orchecksum
. -
codec string
routing_partition_size number | string
Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior is used to capture this behavior while keeping the semantics of the field type.
Depending on the target language, code generators can keep the union or remove it and leniently parse strings to the target type.
-
auto_expand_replicas string
-
merge object
Additional properties are allowed.
-
search object
Additional properties are allowed.
-
refresh_interval string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
max_result_window number
-
max_inner_result_window number
-
max_rescore_window number
-
max_docvalue_fields_search number
-
max_script_fields number
-
max_ngram_diff number
-
max_shingle_diff number
-
blocks object
Additional properties are allowed.
-
max_refresh_listeners number
-
analyze object
Additional properties are allowed.
-
highlight object
Additional properties are allowed.
-
max_terms_count number
-
max_regex_length number
-
routing object
Additional properties are allowed.
-
gc_deletes string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
default_pipeline string
-
final_pipeline string
-
lifecycle object
Additional properties are allowed.
-
provided_name string
creation_date number | string
Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior is used to capture this behavior while keeping the semantics of the field type.
Depending on the target language, code generators can keep the union or remove it and leniently parse strings to the target type.
One of: Time unit for milliseconds
creation_date_string string | number
A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
One of: Time unit for milliseconds
-
uuid string
-
version object
Additional properties are allowed.
verified_before_close boolean | string
format string | number
-
max_slices_per_scroll number
-
translog object
Additional properties are allowed.
-
query_string object
Additional properties are allowed.
priority number | string
-
top_metrics_max_size number
-
analysis object
Additional properties are allowed.
-
Additional properties are allowed.
-
time_series object
Additional properties are allowed.
-
queries object
Additional properties are allowed.
-
similarity object
Configure custom similarity settings to customize how search results are scored.
-
mapping object
Additional properties are allowed.
-
indexing.slowlog object
Additional properties are allowed.
-
indexing_pressure object
Additional properties are allowed.
-
store object
Additional properties are allowed.
curl \
-X PUT http://api.example.com/{index}/_settings \
-H "Content-Type: application/json" \
-d '"{\n \"index\" : {\n \"number_of_replicas\" : 2\n }\n}"'
{
"index" : {
"number_of_replicas" : 2
}
}
{
"acknowledged": true
}