【问题标题】:Elastic Search Get index API to get indices older than 30 daysElastic Search Get index API 以获取超过 30 天的索引
【发布时间】:2020-05-29 23:23:18
【问题描述】:

我们正在使用弹性搜索 5,我需要通过 API 删除超过 30 天的索引。有人可以帮我解决这个问题吗?

【问题讨论】:

  • 您需要创建超过 30 天的索引或超过 30 天处于非活动状态的索引?

标签: elasticsearch


【解决方案1】:

您可以使用 curator 来执行此操作。

https://www.elastic.co/guide/en/elasticsearch/client/curator/5.x/delete_indices.html

curator --host <hostname> delete indices --older-than 30

【讨论】:

  • hostname 是指运行弹性搜索的系统主机名吗?
  • 错误参数 --older-than 和 --newer-than 需要 --time-unit 参数
猜你喜欢
  • 2021-07-30
  • 1970-01-01
  • 1970-01-01
  • 2019-08-30
  • 2013-08-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-01
相关资源
最近更新 更多