Skip to main content
Glama
cloudsmithy

Easysearch MCP Server

by cloudsmithy

ilm_policy_create

Create Index Lifecycle Management policies to automatically manage data through hot, warm, cold, and delete phases based on age and size thresholds.

Instructions

    创建 ILM 策略
    
    参数:
        policy_id: 策略 ID
        hot: 热阶段配置
        warm: 温阶段配置
        cold: 冷阶段配置
        delete: 删除阶段配置
        description: 策略描述
    
    示例 - 基本策略:
        ilm_policy_create("logs-policy",
            hot={
                "min_age": "0ms",
                "actions": {
                    "rollover": {"max_size": "50gb", "max_age": "30d"}
                }
            },
            delete={
                "min_age": "90d",
                "actions": {"delete": {}}
            }
        )
    
    示例 - 完整生命周期:
        ilm_policy_create("full-lifecycle",
            hot={
                "min_age": "0ms",
                "actions": {
                    "rollover": {"max_size": "50gb", "max_age": "7d"},
                    "set_priority": {"priority": 100}
                }
            },
            warm={
                "min_age": "30d",
                "actions": {
                    "shrink": {"number_of_shards": 1},
                    "forcemerge": {"max_num_segments": 1},
                    "set_priority": {"priority": 50}
                }
            },
            cold={
                "min_age": "60d",
                "actions": {
                    "set_priority": {"priority": 0}
                }
            },
            delete={
                "min_age": "90d",
                "actions": {"delete": {}}
            }
        )
    
    常用 actions:
        - rollover: 滚动索引 (max_size, max_age, max_docs)
        - shrink: 收缩分片数
        - forcemerge: 合并段
        - set_priority: 设置恢复优先级
        - allocate: 分配到特定节点
        - readonly: 设为只读
        - delete: 删除索引
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
policy_idYes
hotNo
warmNo
coldNo
deleteNo
descriptionNo
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cloudsmithy/easysearch-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server