template_create
Create index templates to define mappings, settings, and aliases for matching index patterns in Easysearch, ensuring consistent data structure and behavior across multiple indices.
Instructions
创建索引模板
参数:
name: 模板名称
index_patterns: 匹配的索引模式列表
template: 模板内容(mappings、settings、aliases)
priority: 优先级
composed_of: 组件模板列表
示例:
template_create("logs-template",
index_patterns=["logs-*"],
template={
"settings": {"number_of_shards": 3},
"mappings": {"properties": {"@timestamp": {"type": "date"}}}
},
priority=100
)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| index_patterns | Yes | ||
| template | Yes | ||
| priority | No | ||
| composed_of | No |