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"
}
``
相关推荐
RuoyiOffice5 分钟前
Hyper-V+Kubernetes 搭建实战:保留 Windows,构建三节点 Linux 容器集群
linux·spring boot·kubernetes·containerd·hyper-v·微服务部署·ruoyi office
砚底藏山河6 分钟前
量化回测可复现流水线CI化
java·python·ci/cd·金融
骑着蜗牛撵大象3276 分钟前
Spring Boot 4.1 + Spring AI 2.0:RAG 供文、图谱供关系、MCP 供工具的 Java Agent 平台
java·spring boot·spring·微服务·知识图谱·rag·mcp
承渊政道26 分钟前
Linux网络学习【五种IO模型与⾮阻塞IO】
linux·网络·学习·ubuntu·io模型·非阻塞io
衍生星球26 分钟前
【Java 语言】— 面向对象:构造方法(无参、有参构造)
java·开发语言
SimonKing28 分钟前
素笺( local-notes)全面优化,新增功能体验不一样的笔记
java·后端·程序员
techpupil29 分钟前
IDEA基础配置及开发基础插件
java·ide·intellij-idea
yuniko-n34 分钟前
【JVM】对象内存布局
java·开发语言·jvm
CoderYanger41 分钟前
Java EE 进阶:6.SpringBoot 配置文件(第二弹)
java·spring boot·spring·面试·职场和发展·java-ee·程序员创富
文丑颜不良啊42 分钟前
LeetCode1681~1700题目解析
java·leetcode