Skip to content
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

Adds to templates API #1765

Merged
merged 2 commits into from
Nov 1, 2022
Merged
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: 4 additions & 2 deletions _opensearch/index-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ Index templates let you initialize new indexes with predefined mappings and sett

### Create a template

To create an index template, use a POST request:
To create an index template, use a PUT or POST request:

```json
POST _index_template
PUT _index_template/<template name>
POST _index_template/<template name>
```

This command creates a template named `daily_logs` and applies it to any new index whose name matches the pattern `logs-2020-01-*` and also adds it to the `my_logs` alias:
Expand Down Expand Up @@ -105,6 +106,7 @@ To list all index templates:

```json
GET _cat/templates
GET /_index_template
```

To find a template by its name:
Expand Down