mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 13:08:29 +00:00
f6686345c9
The docs tests have recently been running much slower than before (see #49753). The gist here is that with ILM/SLM we do a lot of unnecessary setup / teardown work on each test. Compounded with the slightly slower cluster state storage mechanism, this causes the tests to run much slower. In particular, on RAMDisk, docs:check is taking ES 7.4: 6:55 minutes ES master: 16:09 minutes ES with this commit: 6:52 minutes on SSD, docs:check is taking ES 7.4: ??? minutes ES master: 32:20 minutes ES with this commit: 11:21 minutes
92 lines
2.0 KiB
Plaintext
92 lines
2.0 KiB
Plaintext
[[indices-get-template]]
|
|
=== Get index template API
|
|
++++
|
|
<titleabbrev>Get index template</titleabbrev>
|
|
++++
|
|
|
|
Returns 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-api-request]]
|
|
==== {api-request-title}
|
|
|
|
`GET /_template/<index-template>`
|
|
|
|
|
|
[[get-template-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
include::{docdir}/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-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=include-type-name]
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=local]
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
|
|
|
|
|
[[get-template-api-example]]
|
|
==== {api-examples-title}
|
|
|
|
|
|
[[get-template-api-multiple-ex]]
|
|
===== Get multiple index templates
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
GET /_template/template_1,template_2
|
|
--------------------------------------------------
|
|
|
|
|
|
[[get-template-api-wildcard-ex]]
|
|
===== Get index templates using a wildcard expression
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
GET /_template/temp*
|
|
--------------------------------------------------
|
|
|
|
|
|
[[get-template-api-all-ex]]
|
|
===== Get all index templates
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
GET /_template
|
|
--------------------------------------------------
|