-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[DOCS] Refactored index-templates topic. #59737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
41fa419
[DOCS] Refactored index-templates topic.
debadair b569d43
[DOCS] Add separate files.
debadair 4b06620
[DOCS] Add delete component template.
debadair d184f38
Updated xref
debadair a02b33d
Flag legacy APIs in TOC
debadair 2f921cf
Apply suggestions from code review
debadair c74d88d
[DOCS] Incorporated review commnents
debadair dc2d239
Fixed dupes
debadair cf7c260
Fix xrefs
debadair 7f2a8b1
fix
debadair dcabac9
fix xref
debadair b2fd69f
Merge branch 'master' into component-templates
debadair 1cd9ad7
Fix test
debadair 11f0864
fix
debadair File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| -------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| -------------------------------------------------- |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.