Create or update an index template
create_index_templateCreate or update a composable index template to define settings, mappings, and aliases for new indices matching wildcard patterns. This solves configuring index structure before creation.
Instructions
Create or update a composable index template (Elasticsearch 7.8+). It applies only to indices created after it, never to existing ones.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Template name | |
| version | No | Version number, for your own tracking | |
| priority | No | Precedence when several templates match; higher wins | |
| template | Yes | What to apply: { settings, mappings, aliases } | |
| indexPatterns | Yes | Index wildcards the template applies to, e.g. ['logs-*'] |