Create or update a component template Added in 7.8.0
Creates or updates a component template. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
An index template can be composed of multiple component templates.
To use a component template, specify it in an index template’s composed_of
list.
Component templates are only applied to new data streams and indices as part of a matching index template.
Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template.
Component templates are only used during index creation. For data streams, this includes data stream creation and the creation of a stream’s backing indices. Changes to component templates do not affect existing indices, including a stream’s backing indices.
You can use C-style /* *\/
block comments in component templates.
You can include comments anywhere in the request body except before the opening curly bracket.
Path parameters
-
Name of the component template to create. Elasticsearch includes the following built-in component templates:
logs-mappings
;logs-settings
;metrics-mappings
;metrics-settings
;synthetics-mapping
;synthetics-settings
. Elastic Agent uses these templates to configure backing indices for its data streams. If you use Elastic Agent and want to overwrite one of these templates, set theversion
for your replacement template higher than the current version. If you don’t use Elastic Agent and want to disable all built-in component and index templates, setstack.templates.enabled
tofalse
using the cluster update settings API.
Query parameters
-
create boolean
If
true
, this request cannot replace or update existing component templates. -
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.
Body Required
-
Additional properties are allowed.
Hide template attributes Show template attributes object
-
aliases object
Hide aliases attribute Show aliases attribute object
-
Additional properties are allowed.
Hide * attributes Show * attributes object
-
filter object
Additional properties are allowed.
-
index_routing string
-
is_hidden boolean
If
true
, the alias is hidden. All indices for the alias must have the sameis_hidden
value. -
is_write_index boolean
If
true
, the index is the write index for the alias. -
routing string
-
search_routing string
-
-
-
mappings object
Additional properties are allowed.
Hide mappings attributes Show mappings attributes object
-
all_field object
Additional properties are allowed.
Hide all_field attributes Show all_field attributes object
-
date_detection boolean
-
dynamic string
Values are
strict
,runtime
,true
, orfalse
. -
dynamic_date_formats array[string]
-
dynamic_templates array[object]
-
_field_names object
Additional properties are allowed.
Hide _field_names attribute Show _field_names attribute object
-
index_field object
Additional properties are allowed.
Hide index_field attribute Show index_field attribute object
-
_meta object
Hide _meta attribute Show _meta attribute object
-
Additional properties are allowed.
-
-
numeric_detection boolean
-
properties object
-
_routing object
Additional properties are allowed.
Hide _routing attribute Show _routing attribute object
-
_size object
Additional properties are allowed.
Hide _size attribute Show _size attribute object
-
_source object
Additional properties are allowed.
-
runtime object
Hide runtime attribute Show runtime attribute object
-
Additional properties are allowed.
Hide * attributes Show * attributes object
-
fields object
For type
composite
-
fetch_fields array[object]
For type
lookup
-
format string
A custom format for
date
type runtime fields. -
input_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
target_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
target_index string
-
script object
Additional properties are allowed.
Hide script attributes Show script attributes object
-
source string
The script source.
-
id string
-
params object
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
Hide params attribute Show params attribute object
-
Additional properties are allowed.
-
-
options object
Hide options attribute Show options attribute object
-
-
Values are
boolean
,composite
,date
,double
,geo_point
,ip
,keyword
,long
, orlookup
.
-
-
-
enabled boolean
-
subobjects boolean
-
_data_stream_timestamp object
Additional properties are allowed.
Hide _data_stream_timestamp attribute Show _data_stream_timestamp attribute object
-
-
Additional properties are allowed.
Hide settings attributes Show settings attributes object
-
Additional properties are allowed.
-
mode string
routing_path string | array[string]
-
soft_deletes object
Additional properties are allowed.
Hide soft_deletes attributes Show soft_deletes attributes object
-
enabled boolean
Indicates whether soft deletes are enabled on the index.
-
retention_lease object
Additional properties are allowed.
Hide retention_lease attribute Show retention_lease attribute object
-
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.
-
-
-
sort object
Additional properties are allowed.
Hide sort attributes Show sort attributes object
-
field string | array[string]
-
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.
hidden boolean | string
-
auto_expand_replicas string
-
merge object
Additional properties are allowed.
Hide merge attribute Show merge attribute object
-
scheduler object
Additional properties are allowed.
Hide scheduler attributes Show scheduler attributes object
max_thread_count 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.
max_merge_count 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.
-
-
search object
Additional properties are allowed.
Hide search attributes Show search attributes object
-
idle object
Additional properties are allowed.
Hide idle attribute Show idle attribute object
-
after 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.
-
-
slowlog object
Additional properties are allowed.
Hide slowlog attributes Show slowlog attributes object
-
level string
-
source number
-
reformat boolean
-
threshold object
Additional properties are allowed.
Hide threshold attributes Show threshold attributes object
-
query object
Additional properties are allowed.
Hide query attributes Show query attributes object
-
warn 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. -
info 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. -
debug 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. -
trace 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.
-
-
fetch object
Additional properties are allowed.
Hide fetch attributes Show fetch attributes object
-
warn 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. -
info 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. -
debug 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. -
trace 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.
-
-
-
-
-
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.
Hide blocks attributes Show blocks attributes object
read_only boolean | 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.
read_only_allow_delete boolean | 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.
read boolean | 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.
write boolean | 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.
metadata boolean | 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.
-
max_refresh_listeners number
-
analyze object
Additional properties are allowed.
Hide analyze attribute Show analyze attribute object
max_token_count 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.
-
highlight object
Additional properties are allowed.
Hide highlight attribute Show highlight attribute object
-
max_analyzed_offset number
-
-
max_terms_count number
-
max_regex_length number
-
routing object
Additional properties are allowed.
Hide routing attributes Show routing attributes object
-
allocation object
Additional properties are allowed.
Hide allocation attributes Show allocation attributes object
-
enable string
Values are
all
,primaries
,new_primaries
, ornone
. -
include object
Additional properties are allowed.
Hide include attributes Show include attributes object
-
_tier_preference string
-
_id string
-
-
initial_recovery object
Additional properties are allowed.
Hide initial_recovery attribute Show initial_recovery attribute object
-
_id string
-
-
disk object
Additional properties are allowed.
Hide disk attribute Show disk attribute object
threshold_enabled boolean | string
-
-
rebalance object
Additional properties are allowed.
Hide rebalance attribute Show rebalance attribute object
-
Values are
all
,primaries
,replicas
, ornone
.
-
-
-
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.
Hide lifecycle attributes Show lifecycle attributes object
-
name string
indexing_complete boolean | 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.
-
origination_date number
If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting if you create a new index that contains old data and want to use the original creation date to calculate the index age. Specified as a Unix epoch value in milliseconds.
-
parse_origination_date boolean
Set to true to parse the origination date from the index name. This origination date is used to calculate the index age for its phase transitions. The index name must match the pattern .*-{date_format}-\d+, where the date_format is yyyy.MM.dd and the trailing digits are optional. An index that was rolled over would normally match the full format, for example logs-2016.10.31-000002). If the index name doesn’t match the pattern, index creation fails.
-
step object
Additional properties are allowed.
Hide step attribute Show step attribute object
-
wait_time_threshold 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.
-
-
rollover_alias string
The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action. When the index rolls over, the alias is updated to reflect that the index is no longer the write index. For more information about rolling indices, see Rollover.
-
-
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.
Hide version attributes Show version attributes object
-
created string
-
created_string string
-
verified_before_close boolean | string
format string | number
-
max_slices_per_scroll number
-
translog object
Additional properties are allowed.
Hide translog attributes Show translog attributes object
-
sync_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. -
durability string
Values are
request
,REQUEST
,async
, orASYNC
. flush_threshold_size number | string
-
retention object
Additional properties are allowed.
Hide retention attributes Show retention attributes object
-
-
query_string object
Additional properties are allowed.
Hide query_string attribute Show query_string attribute object
lenient boolean | string Required
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.
priority number | string
-
top_metrics_max_size number
-
analysis object
Additional properties are allowed.
Hide analysis attributes Show analysis attributes object
-
analyzer object
-
char_filter object
-
filter object
-
normalizer object
-
tokenizer object
-
-
Additional properties are allowed.
-
time_series object
Additional properties are allowed.
Hide time_series attributes Show time_series attributes object
start_time 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
-
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.
Hide mapping attributes Show mapping attributes object
-
coerce boolean
-
total_fields object
Additional properties are allowed.
Hide total_fields attributes Show total_fields attributes object
-
limit number
The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit. The limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance degradations and memory issues, especially in clusters with a high load or few resources.
-
ignore_dynamic_beyond_limit boolean
This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set to false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail with the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail. Instead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false. The fields that were not added to the mapping will be added to the _ignored field.
-
-
depth object
Additional properties are allowed.
Hide depth attribute Show depth attribute object
-
limit number
The maximum depth for a field, which is measured as the number of inner objects. For instance, if all fields are defined at the root object level, then the depth is 1. If there is one object mapping, then the depth is 2, etc.
-
-
nested_fields object
Additional properties are allowed.
Hide nested_fields attribute Show nested_fields attribute object
-
limit number
The maximum number of distinct nested mappings in an index. The nested type should only be used in special cases, when arrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this setting limits the number of unique nested types per index.
-
-
nested_objects object
Additional properties are allowed.
Hide nested_objects attribute Show nested_objects attribute object
-
limit number
The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects.
-
-
field_name_length object
Additional properties are allowed.
Hide field_name_length attribute Show field_name_length attribute object
-
limit number
Setting for the maximum length of a field name. This setting isn’t really something that addresses mappings explosion but might still be useful if you want to limit the field length. It usually shouldn’t be necessary to set this setting. The default is okay unless a user starts to add a huge number of fields with really long names. Default is
Long.MAX_VALUE
(no limit).
-
-
dimension_fields object
Additional properties are allowed.
Hide dimension_fields attribute Show dimension_fields attribute object
-
limit number
[preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
-
-
ignore_malformed boolean
-
-
indexing.slowlog object
Additional properties are allowed.
Hide indexing.slowlog attributes Show indexing.slowlog attributes object
-
level string
-
source number
-
reformat boolean
-
threshold object
Additional properties are allowed.
Hide threshold attribute Show threshold attribute object
-
index object
Additional properties are allowed.
Hide index attributes Show index attributes object
-
warn 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. -
info 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. -
debug 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. -
trace 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.
-
-
-
-
indexing_pressure object
Additional properties are allowed.
Hide indexing_pressure attribute Show indexing_pressure attribute object
-
Additional properties are allowed.
Hide memory attribute Show memory attribute object
-
limit number
Number of outstanding bytes that may be consumed by indexing requests. When this limit is reached or exceeded, the node will reject new coordinating and primary operations. When replica operations consume 1.5x this limit, the node will reject new replica operations. Defaults to 10% of the heap.
-
-
-
store object
Additional properties are allowed.
Hide store attributes Show store attributes object
-
allow_mmap boolean
You can restrict the use of the mmapfs and the related hybridfs store type via the setting node.store.allow_mmap. This is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This setting is useful, for example, if you are in an environment where you can not control the ability to create a lot of memory maps so you need disable the ability to use memory-mapping.
-
-
Additional properties are allowed.
Hide defaults attributes Show defaults attributes object
-
Additional properties are allowed.
-
mode string
routing_path string | array[string]
-
soft_deletes object
Additional properties are allowed.
Hide soft_deletes attributes Show soft_deletes attributes object
-
enabled boolean
Indicates whether soft deletes are enabled on the index.
-
retention_lease object
Additional properties are allowed.
Hide retention_lease attribute Show retention_lease attribute object
-
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.
-
-
-
sort object
Additional properties are allowed.
Hide sort attributes Show sort attributes object
-
field string | array[string]
-
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.
hidden boolean | string
-
auto_expand_replicas string
-
merge object
Additional properties are allowed.
Hide merge attribute Show merge attribute object
-
scheduler object
Additional properties are allowed.
Hide scheduler attributes Show scheduler attributes object
max_thread_count 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.
max_merge_count 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.
-
-
search object
Additional properties are allowed.
Hide search attributes Show search attributes object
-
idle object
Additional properties are allowed.
Hide idle attribute Show idle attribute object
-
after 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.
-
-
slowlog object
Additional properties are allowed.
Hide slowlog attributes Show slowlog attributes object
-
level string
-
source number
-
reformat boolean
-
threshold object
Additional properties are allowed.
Hide threshold attributes Show threshold attributes object
-
query object
Additional properties are allowed.
Hide query attributes Show query attributes object
-
warn 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. -
info 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. -
debug 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. -
trace 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.
-
-
fetch object
Additional properties are allowed.
Hide fetch attributes Show fetch attributes object
-
warn 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. -
info 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. -
debug 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. -
trace 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.
-
-
-
-
-
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.
Hide blocks attributes Show blocks attributes object
read_only boolean | 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.
read_only_allow_delete boolean | 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.
read boolean | 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.
write boolean | 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.
metadata boolean | 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.
-
max_refresh_listeners number
-
analyze object
Additional properties are allowed.
Hide analyze attribute Show analyze attribute object
max_token_count 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.
-
highlight object
Additional properties are allowed.
Hide highlight attribute Show highlight attribute object
-
max_analyzed_offset number
-
-
max_terms_count number
-
max_regex_length number
-
routing object
Additional properties are allowed.
Hide routing attributes Show routing attributes object
-
allocation object
Additional properties are allowed.
Hide allocation attributes Show allocation attributes object
-
enable string
Values are
all
,primaries
,new_primaries
, ornone
. -
include object
Additional properties are allowed.
Hide include attributes Show include attributes object
-
_tier_preference string
-
_id string
-
-
initial_recovery object
Additional properties are allowed.
Hide initial_recovery attribute Show initial_recovery attribute object
-
_id string
-
-
disk object
Additional properties are allowed.
Hide disk attribute Show disk attribute object
threshold_enabled boolean | string
-
-
rebalance object
Additional properties are allowed.
Hide rebalance attribute Show rebalance attribute object
-
Values are
all
,primaries
,replicas
, ornone
.
-
-
-
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.
Hide lifecycle attributes Show lifecycle attributes object
-
name string
indexing_complete boolean | 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.
-
origination_date number
If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting if you create a new index that contains old data and want to use the original creation date to calculate the index age. Specified as a Unix epoch value in milliseconds.
-
parse_origination_date boolean
Set to true to parse the origination date from the index name. This origination date is used to calculate the index age for its phase transitions. The index name must match the pattern .*-{date_format}-\d+, where the date_format is yyyy.MM.dd and the trailing digits are optional. An index that was rolled over would normally match the full format, for example logs-2016.10.31-000002). If the index name doesn’t match the pattern, index creation fails.
-
step object
Additional properties are allowed.
Hide step attribute Show step attribute object
-
wait_time_threshold 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.
-
-
rollover_alias string
The index alias to update when the index rolls over. Specify when using a policy that contains a rollover action. When the index rolls over, the alias is updated to reflect that the index is no longer the write index. For more information about rolling indices, see Rollover.
-
-
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.
Hide version attributes Show version attributes object
-
created string
-
created_string string
-
verified_before_close boolean | string
format string | number
-
max_slices_per_scroll number
-
translog object
Additional properties are allowed.
Hide translog attributes Show translog attributes object
-
sync_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. -
durability string
Values are
request
,REQUEST
,async
, orASYNC
. flush_threshold_size number | string
-
retention object
Additional properties are allowed.
Hide retention attributes Show retention attributes object
-
-
query_string object
Additional properties are allowed.
Hide query_string attribute Show query_string attribute object
lenient boolean | string Required
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.
priority number | string
-
top_metrics_max_size number
-
analysis object
Additional properties are allowed.
Hide analysis attributes Show analysis attributes object
-
analyzer object
-
char_filter object
-
filter object
-
normalizer object
-
tokenizer object
-
-
Additional properties are allowed.
-
time_series object
Additional properties are allowed.
Hide time_series attributes Show time_series attributes object
start_time 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
-
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.
Hide mapping attributes Show mapping attributes object
-
coerce boolean
-
total_fields object
Additional properties are allowed.
Hide total_fields attributes Show total_fields attributes object
-
limit number
The maximum number of fields in an index. Field and object mappings, as well as field aliases count towards this limit. The limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance degradations and memory issues, especially in clusters with a high load or few resources.
-
ignore_dynamic_beyond_limit boolean
This setting determines what happens when a dynamically mapped field would exceed the total fields limit. When set to false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail with the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail. Instead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false. The fields that were not added to the mapping will be added to the _ignored field.
-
-
depth object
Additional properties are allowed.
Hide depth attribute Show depth attribute object
-
limit number
The maximum depth for a field, which is measured as the number of inner objects. For instance, if all fields are defined at the root object level, then the depth is 1. If there is one object mapping, then the depth is 2, etc.
-
-
nested_fields object
Additional properties are allowed.
Hide nested_fields attribute Show nested_fields attribute object
-
limit number
The maximum number of distinct nested mappings in an index. The nested type should only be used in special cases, when arrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this setting limits the number of unique nested types per index.
-
-
nested_objects object
Additional properties are allowed.
Hide nested_objects attribute Show nested_objects attribute object
-
limit number
The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects.
-
-
field_name_length object
Additional properties are allowed.
Hide field_name_length attribute Show field_name_length attribute object
-
limit number
Setting for the maximum length of a field name. This setting isn’t really something that addresses mappings explosion but might still be useful if you want to limit the field length. It usually shouldn’t be necessary to set this setting. The default is okay unless a user starts to add a huge number of fields with really long names. Default is
Long.MAX_VALUE
(no limit).
-
-
dimension_fields object
Additional properties are allowed.
Hide dimension_fields attribute Show dimension_fields attribute object
-
limit number
[preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
-
-
ignore_malformed boolean
-
-
indexing.slowlog object
Additional properties are allowed.
Hide indexing.slowlog attributes Show indexing.slowlog attributes object
-
level string
-
source number
-
reformat boolean
-
threshold object
Additional properties are allowed.
Hide threshold attribute Show threshold attribute object
-
index object
Additional properties are allowed.
Hide index attributes Show index attributes object
-
warn 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. -
info 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. -
debug 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. -
trace 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.
-
-
-
-
indexing_pressure object
Additional properties are allowed.
Hide indexing_pressure attribute Show indexing_pressure attribute object
-
Additional properties are allowed.
Hide memory attribute Show memory attribute object
-
limit number
Number of outstanding bytes that may be consumed by indexing requests. When this limit is reached or exceeded, the node will reject new coordinating and primary operations. When replica operations consume 1.5x this limit, the node will reject new replica operations. Defaults to 10% of the heap.
-
-
-
store object
Additional properties are allowed.
Hide store attributes Show store attributes object
-
allow_mmap boolean
You can restrict the use of the mmapfs and the related hybridfs store type via the setting node.store.allow_mmap. This is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This setting is useful, for example, if you are in an environment where you can not control the ability to create a lot of memory maps so you need disable the ability to use memory-mapping.
-
-
data_stream string
-
lifecycle object
Additional properties are allowed.
Hide lifecycle attributes Show lifecycle attributes object
-
data_retention 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. -
downsampling object
Additional properties are allowed.
Hide downsampling attribute Show downsampling attribute object
-
The list of downsampling rounds to execute as part of this downsampling configuration
Hide rounds attributes Show rounds attributes object
-
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. -
Additional properties are allowed.
Hide config attribute Show config attribute object
-
A date histogram interval. Similar to
Duration
with additional units:w
(week),M
(month),q
(quarter) andy
(year)
-
-
-
-
enabled boolean
If defined, it turns data stream lifecycle on/off (
true
/false
) for this data stream. A data stream lifecycle that's disabled (enabled:false
) will have no effect on the data stream.
-
-
-
version number
-
_meta object
Hide _meta attribute Show _meta attribute object
-
Additional properties are allowed.
-
-
deprecated boolean
Marks this index template as deprecated. When creating or updating a non-deprecated index template that uses deprecated components, Elasticsearch will emit a deprecation warning.
curl \
-X PUT http://api.example.com/_component_template/{name} \
-H "Content-Type: application/json" \
-d '{"template":{"aliases":{"additionalProperty1":{"filter":{},"index_routing":"string","is_hidden":true,"is_write_index":true,"routing":"string","search_routing":"string"},"additionalProperty2":{"filter":{},"index_routing":"string","is_hidden":true,"is_write_index":true,"routing":"string","search_routing":"string"}},"mappings":{"all_field":{"analyzer":"string","enabled":true,"omit_norms":true,"search_analyzer":"string","similarity":"string","store":true,"store_term_vector_offsets":true,"store_term_vector_payloads":true,"store_term_vector_positions":true,"store_term_vectors":true},"date_detection":true,"dynamic":"strict","dynamic_date_formats":["string"],"dynamic_templates":[{}],"_field_names":{"enabled":true},"index_field":{"enabled":true},"_meta":{"additionalProperty1":{},"additionalProperty2":{}},"numeric_detection":true,"properties":{},"_routing":{"required":true},"_size":{"enabled":true},"_source":{"compress":true,"compress_threshold":"string","enabled":true,"excludes":["string"],"includes":["string"],"mode":"disabled"},"runtime":{"additionalProperty1":{"fields":{"additionalProperty1":{"type":"boolean"},"additionalProperty2":{"type":"boolean"}},"fetch_fields":[{"field":"string","format":"string"}],"format":"string","input_field":"string","target_field":"string","target_index":"string","script":{"source":"string","id":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"":"painless","options":{"additionalProperty1":"string","additionalProperty2":"string"}},"type":"boolean"},"additionalProperty2":{"fields":{"additionalProperty1":{"type":"boolean"},"additionalProperty2":{"type":"boolean"}},"fetch_fields":[{"field":"string","format":"string"}],"format":"string","input_field":"string","target_field":"string","target_index":"string","script":{"source":"string","id":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"":"painless","options":{"additionalProperty1":"string","additionalProperty2":"string"}},"type":"boolean"}},"enabled":true,"subobjects":true,"_data_stream_timestamp":{"enabled":true}},"additionalProperty1":{"additionalProperty1":{},"additionalProperty2":{},"mode":"string","routing_path":"string","soft_deletes":{"enabled":true,"retention_lease":{"period":"string"}},"sort":{"field":"string","order":"asc","mode":"min","missing":"_last"},"number_of_shards":42.0,"number_of_replicas":42.0,"number_of_routing_shards":42.0,"check_on_startup":"true","codec":"string","":"string","load_fixed_bitset_filters_eagerly":true,"hidden":true,"auto_expand_replicas":"string","merge":{"scheduler":{"":42.0}},"search":{"idle":{"after":"string"},"slowlog":{"level":"string","source":42.0,"reformat":true,"threshold":{"query":{"warn":"string","info":"string","debug":"string","trace":"string"},"fetch":{"warn":"string","info":"string","debug":"string","trace":"string"}}}},"refresh_interval":"string","max_result_window":42.0,"max_inner_result_window":42.0,"max_rescore_window":42.0,"max_docvalue_fields_search":42.0,"max_script_fields":42.0,"max_ngram_diff":42.0,"max_shingle_diff":42.0,"blocks":{"":true},"max_refresh_listeners":42.0,"analyze":{"":42.0},"highlight":{"max_analyzed_offset":42.0},"max_terms_count":42.0,"max_regex_length":42.0,"routing":{"allocation":{"enable":"all","include":{"_tier_preference":"string","_id":"string"},"initial_recovery":{"_id":"string"},"disk":{"threshold_enabled":true}},"rebalance":{"enable":"all"}},"gc_deletes":"string","default_pipeline":"string","final_pipeline":"string","lifecycle":{"name":"string","":true,"origination_date":42.0,"parse_origination_date":true,"step":{"wait_time_threshold":"string"},"rollover_alias":"string"},"provided_name":"string","uuid":"string","version":{"created":"string","created_string":"string"},"verified_before_close":true,"format":"string","max_slices_per_scroll":42.0,"translog":{"sync_interval":"string","durability":"request","":42.0,"retention":{"":42.0,"age":"string"}},"query_string":{"":true},"priority":42.0,"top_metrics_max_size":42.0,"analysis":{"analyzer":{},"char_filter":{},"filter":{},"normalizer":{},"tokenizer":{}},"time_series":{"":"string"},"queries":{"cache":{"enabled":true}},"similarity":{},"mapping":{"coerce":true,"total_fields":{"limit":42.0,"ignore_dynamic_beyond_limit":true},"depth":{"limit":42.0},"nested_fields":{"limit":42.0},"nested_objects":{"limit":42.0},"field_name_length":{"limit":42.0},"dimension_fields":{"limit":42.0},"ignore_malformed":true},"indexing.slowlog":{"level":"string","source":42.0,"reformat":true,"threshold":{"index":{"warn":"string","info":"string","debug":"string","trace":"string"}}},"indexing_pressure":{"memory":{"limit":42.0}},"store":{"":"fs","allow_mmap":true}},"additionalProperty2":{"additionalProperty1":{},"additionalProperty2":{},"mode":"string","routing_path":"string","soft_deletes":{"enabled":true,"retention_lease":{"period":"string"}},"sort":{"field":"string","order":"asc","mode":"min","missing":"_last"},"number_of_shards":42.0,"number_of_replicas":42.0,"number_of_routing_shards":42.0,"check_on_startup":"true","codec":"string","":"string","load_fixed_bitset_filters_eagerly":true,"hidden":true,"auto_expand_replicas":"string","merge":{"scheduler":{"":42.0}},"search":{"idle":{"after":"string"},"slowlog":{"level":"string","source":42.0,"reformat":true,"threshold":{"query":{"warn":"string","info":"string","debug":"string","trace":"string"},"fetch":{"warn":"string","info":"string","debug":"string","trace":"string"}}}},"refresh_interval":"string","max_result_window":42.0,"max_inner_result_window":42.0,"max_rescore_window":42.0,"max_docvalue_fields_search":42.0,"max_script_fields":42.0,"max_ngram_diff":42.0,"max_shingle_diff":42.0,"blocks":{"":true},"max_refresh_listeners":42.0,"analyze":{"":42.0},"highlight":{"max_analyzed_offset":42.0},"max_terms_count":42.0,"max_regex_length":42.0,"routing":{"allocation":{"enable":"all","include":{"_tier_preference":"string","_id":"string"},"initial_recovery":{"_id":"string"},"disk":{"threshold_enabled":true}},"rebalance":{"enable":"all"}},"gc_deletes":"string","default_pipeline":"string","final_pipeline":"string","lifecycle":{"name":"string","":true,"origination_date":42.0,"parse_origination_date":true,"step":{"wait_time_threshold":"string"},"rollover_alias":"string"},"provided_name":"string","uuid":"string","version":{"created":"string","created_string":"string"},"verified_before_close":true,"format":"string","max_slices_per_scroll":42.0,"translog":{"sync_interval":"string","durability":"request","":42.0,"retention":{"":42.0,"age":"string"}},"query_string":{"":true},"priority":42.0,"top_metrics_max_size":42.0,"analysis":{"analyzer":{},"char_filter":{},"filter":{},"normalizer":{},"tokenizer":{}},"time_series":{"":"string"},"queries":{"cache":{"enabled":true}},"similarity":{},"mapping":{"coerce":true,"total_fields":{"limit":42.0,"ignore_dynamic_beyond_limit":true},"depth":{"limit":42.0},"nested_fields":{"limit":42.0},"nested_objects":{"limit":42.0},"field_name_length":{"limit":42.0},"dimension_fields":{"limit":42.0},"ignore_malformed":true},"indexing.slowlog":{"level":"string","source":42.0,"reformat":true,"threshold":{"index":{"warn":"string","info":"string","debug":"string","trace":"string"}}},"indexing_pressure":{"memory":{"limit":42.0}},"store":{"":"fs","allow_mmap":true}},"data_stream":"string","lifecycle":{"data_retention":"string","downsampling":{"rounds":[{"after":"string","config":{"fixed_interval":"string"}}]},"enabled":true}},"version":42.0,"_meta":{"additionalProperty1":{},"additionalProperty2":{}},"deprecated":true}'