ES类的索引轮换

通过以下请求方法创建一个名为 "tiered-storage-policy" 的 ISM policy:

PUT _plugins/_ism/policies/tiered-storage-policy

json 复制代码
{
  "policy": {
    "description": "Changes replica count and deletes.",
    "schema_version": 1,
    "default_state": "current",
    "states": [{
        "name": "current",
        "actions": [],
        "transitions": [{
          "state_name": "old",
          "conditions": {
            "min_index_age": "7d"
          }
        }]
      },
      {
        "name": "old",
        "actions": [{
          "replica_count": {
            "number_of_replicas": 0
          }
        }],
        "transitions": [{
          "state_name": "delete",
          "conditions": {
            "min_index_age": "21d"
          }
        }]
      },
      {
        "name": "delete",
        "actions": [{
          "delete": {}
        }],
        "transitions": []
      }
    ]
  }
}

创建策略后,请将它附加到一个或多个索引:

json 复制代码
POST _plugins/_ism/add/my-index
{
  "policy_id": "my-policy-id"
}
``
相关推荐
奔跑吧邓邓子1 天前
【Java实战㉝】Spring Boot实战:从入门到自动配置的进阶之路
java·spring boot·实战·自动配置
ONLYOFFICE1 天前
【技术教程】如何将ONLYOFFICE文档集成到使用Spring Boot框架编写的Java Web应用程序中
java·spring boot·编辑器
叫我阿柒啊1 天前
Java全栈开发工程师的实战面试经历:从基础到微服务
java·微服务·typescript·vue·springboot·前端开发·后端开发
Ribou1 天前
Ubuntu 24.04.2安装k8s 1.33.4 配置cilium
linux·ubuntu·kubernetes
cyforkk1 天前
Spring 异常处理器:从混乱到有序,优雅处理所有异常
java·后端·spring·mvc
生擒小朵拉1 天前
STM32添加库函数
java·javascript·stm32
Z_z在努力1 天前
【杂类】Spring 自动装配原理
java·spring·mybatis
tan180°1 天前
Boost搜索引擎 网络库与前端(4)
linux·网络·c++·搜索引擎
2301_781668611 天前
Elasticsearch 02
大数据·elasticsearch·搜索引擎
小小菜鸡ing1 天前
pymysql
java·服务器·数据库