Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/reference/glossary.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ same cluster name. Each cluster has a single master node which is
chosen automatically by the cluster and which can be replaced if the
current master node fails.

[[glossary-component-template]] component template ::
// tag::component-template-def[]
A building block for constructing <<indices-templates,index templates>> that specifies index
<<mapping,mappings>>, <<index-modules-settings,settings>>, and <<indices-aliases,aliases>>.
// end::component-template-def[]

[[glossary-ccr]] {ccr} (CCR)::

The {ccr} feature enables you to replicate indices in remote clusters to your
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ include::setup.asciidoc[]

include::upgrade.asciidoc[]

include::indices/index-templates.asciidoc[]

include::search/index.asciidoc[]

include::query-dsl.asciidoc[]
Expand Down
22 changes: 17 additions & 5 deletions docs/reference/indices.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,20 @@ index settings, aliases, mappings, and index templates.
* <<indices-analyze>>

[discrete]
[[index-templates]]
[[index-templates-apis]]
=== Index templates:
* <<indices-templates>>

Index templates automatically apply settings, mappings, and aliases to new indices.
They are most often used to configure rolling indices for time series data to
ensure that each new index has the same configuration as the previous one.
For more information, see <<indices-templates, Index Templates>>.

* <<indices-put-template>>
* <<indices-get-template>>
* <<indices-delete-template>>
* <<indices-component-template>>
* <<getting-component-templates>>
* <<indices-delete-component-template>>
* <<indices-template-exists>>

[discrete]
Expand Down Expand Up @@ -97,6 +103,8 @@ include::indices/delete-index.asciidoc[]

include::indices/delete-alias.asciidoc[]

include::indices/delete-component-template.asciidoc[]

include::indices/delete-index-template.asciidoc[]

include::indices/flush.asciidoc[]
Expand All @@ -105,6 +113,8 @@ include::indices/forcemerge.asciidoc[]

include::indices/apis/freeze.asciidoc[]

include::indices/get-component-template.asciidoc[]

include::indices/get-field-mapping.asciidoc[]

include::indices/get-index.asciidoc[]
Expand All @@ -115,6 +125,8 @@ include::indices/get-settings.asciidoc[]

include::indices/get-index-template.asciidoc[]

include::indices/get-index-template-v1.asciidoc[]

include::indices/get-mapping.asciidoc[]

include::indices/alias-exists.asciidoc[]
Expand All @@ -133,11 +145,11 @@ include::indices/template-exists.asciidoc[]

include::indices/open-close.asciidoc[]

include::indices/index-templates.asciidoc[]
include::indices/put-index-template.asciidoc[]

include::indices/component-templates.asciidoc[]
include::indices/put-index-template-v1.asciidoc[]

include::indices/templates.asciidoc[]
include::indices/put-component-template.asciidoc[]

include::indices/put-mapping.asciidoc[]

Expand Down
52 changes: 52 additions & 0 deletions docs/reference/indices/delete-component-template.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[[indices-delete-component-template]]
=== Delete component template API
++++
<titleabbrev>Delete component template</titleabbrev>
++++

Deletes an existing component template.

////
[source,console]
--------------------------------------------------
PUT _component_template/template_1
{
"template": {
"settings": {
"index.number_of_replicas": 0
}
}
}
--------------------------------------------------
// TESTSETUP
////

[source,console]
--------------------------------------------------
DELETE _component_template/template_1
--------------------------------------------------


[[delete-component-template-api-request]]
==== {api-request-title}

`DELETE /_template/<component-template>`


[[delete-component-template-api-desc]]
==== {api-description-title}

Use the delete component template API to delete one or more component templates
Component templates are building blocks for constructing <<indices-templates,index templates>>
that specify index mappings, settings, and aliases.

[[delete-component-template-api-path-params]]
==== {api-path-parms-title}

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=component-template]


[[delete-component-template-api-query-params]]
==== {api-query-parms-title}

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
8 changes: 4 additions & 4 deletions docs/reference/indices/delete-index-template.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<titleabbrev>Delete index template</titleabbrev>
++++

Deletes an existing index.
Deletes an index template.

////
[source,console]
Expand Down Expand Up @@ -35,9 +35,9 @@ DELETE /_template/template_1
[[delete-template-api-desc]]
==== {api-description-title}

Use the delete index template API to delete one or more index templates

include::templates.asciidoc[tag=index-template-def]
Use the delete index template API to delete one or more index templates.
Index templates define <<index-modules-settings,settings>>, <<mapping,mappings>>,
and <<indices-aliases,aliases>> that can be applied automatically to new indices.


[[delete-template-api-path-params]]
Expand Down
88 changes: 88 additions & 0 deletions docs/reference/indices/get-component-template.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[[getting-component-templates]]
=== Get component template API
++++
<titleabbrev>Get component template</titleabbrev>
++++

Retrieves information about one or more component templates.

//////////////////////////

[source,console]
--------------------------------------------------
PUT /_component_template/template_1
{
"template": {
"settings": {
"index.number_of_replicas": 0
},
"mappings": {
"properties": {
"@timestamp": {
"type": "date"
}
}
}
}
}
--------------------------------------------------
// TESTSETUP

[source,console]
--------------------------------------------------
DELETE /_component_template/template_*
--------------------------------------------------
// TEARDOWN

//////////////////////////

[source,console]
--------------------------------------------------
GET /_component_template/template_1
--------------------------------------------------

[[get-component-template-api-request]]
==== {api-request-title}

`GET /_component-template/<component-template>`


[[get-component-template-api-path-params]]
==== {api-path-parms-title}

`<component-template>`
(Optional, string)
Comma-separated list of component template names used to limit the request.
Wildcard (`*`) expressions are supported.


[[get-component-template-api-query-params]]
==== {api-query-parms-title}

include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings]

include::{docdir}/rest-api/common-parms.asciidoc[tag=local]

include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]


[[get-component-template-api-example]]
==== {api-examples-title}


[[get-component-template-api-wildcard-ex]]
===== Get component templates using a wildcard expression

[source,console]
--------------------------------------------------
GET /_component_template/temp*
--------------------------------------------------


[[get-component-template-api-all-ex]]
===== Get all component templates

[source,console]
--------------------------------------------------
GET /_component_template
--------------------------------------------------
93 changes: 93 additions & 0 deletions docs/reference/indices/get-index-template-v1.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[[indices-get-template-v1]]
=== Get index template API
++++
<titleabbrev>Get index template (legacy)</titleabbrev>
++++

IMPORTANT: This documentation is about legacy index templates,
which are deprecated and will be replaced by the composable templates introduced in {es} 7.8.
For information about composable templates, <<indices-templates>>.

Retrieves information about one or more index templates.

////
[source,console]
--------------------------------------------------
PUT _template/template_1
{
"index_patterns" : ["te*"],
"settings": {
"number_of_shards": 1
}
}
--------------------------------------------------
// TESTSETUP

[source,console]
--------------------------------------------------
DELETE _template/template_1
--------------------------------------------------
// TEARDOWN

////

[source,console]
--------------------------------------------------
GET /_template/template_1
--------------------------------------------------


[[get-template-v1-api-request]]
==== {api-request-title}

`GET /_template/<index-template>`


[[get-template-v1-api-path-params]]
==== {api-path-parms-title}

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-template]
+
To return all index templates, omit this parameter
or use a value of `_all` or `*`.


[[get-template-v1-api-query-params]]
==== {api-query-parms-title}

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]

include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]


[[get-template-v1-api-example]]
==== {api-examples-title}


[[get-template-v1-api-multiple-ex]]
===== Get multiple index templates

[source,console]
--------------------------------------------------
GET /_template/template_1,template_2
--------------------------------------------------


[[get-template-v1-api-wildcard-ex]]
===== Get index templates using a wildcard expression

[source,console]
--------------------------------------------------
GET /_template/temp*
--------------------------------------------------


[[get-template-v1-api-all-ex]]
===== Get all index templates

[source,console]
--------------------------------------------------
GET /_template
--------------------------------------------------
Loading