简体   繁体   English

如何在没有elasticsearch-curator的情况下删除所有旧索引?

[英]How to delete all old indices without elasticsearch-curator?

I want to delete the old(let say last 10 days) indices from elasticsearch without using curator. 我想不使用策展人就从Elasticsearch中删除旧的索引(比如说过去10天)。 Is there any other way to delete all old indices?. 还有其他删除所有旧索引的方法吗? (Is there a way to delete indices using Node.js) (有没有一种方法可以使用Node.js删除索引)

Note: I have googled about it but did not find any proper answers and also many are using curator. 注意:我已经用谷歌搜索,但是没有找到合适的答案,而且很多人正在使用策展人。

Why not just use the delete index API directly? 为什么不直接使用删除索引API? https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html https://www.elastic.co/guide/zh-CN/elasticsearch/reference/current/indices-delete-index.html

In order to find which index is the oldest, in case there is no naming convention around the indices names or rollover, you can just check what is the min & max timestamp in each index, and then decide based on that which indices to delete. 为了找到哪个索引最旧,如果索引名称或过渡没有命名约定,您可以检查每个索引中的最小和最大时间戳,然后根据要删除的索引来决定。 a simple query to get these timestamp from an index can be found here: What's the fastest manner to retrieve min timestamp from Elasticsearch indices? 从索引中获取这些时间戳的简单查询可以在这里找到: 从Elasticsearch索引中检索最小时间戳的最快方法是什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用NestJs删除旧的Elasticsearch索引 - Deleting old elasticsearch indices Using NestJs 如何使用elasticsearch.js客户端列出所有索引 - How to list ALL indices using elasticsearch.js client 如何正确列出 node.js 中的所有 elasticsearch 索引 - How to properly list all elasticsearch indices from node.js Elasticsearch删除了Javascript客户端失败的索引列表,并显示“无活动连接” - Elasticsearch delete a list of indices with the Javascript client failing with “No Living connections” Elasticsearch仅显示带有节点js的所有索引的名称 - Elasticsearch show only the name of all indices with node js 删除Parse.com中的所有旧对象 - Delete all old objects in Parse.com 如何使用没有前缀的nodejs删除BigTable GCP中的所有行 - How to delete all rows in BigTable GCP using nodejs without prefix 如何从 dynamodb 中批量删除所有没有 TTL 的记录? - How bulk delete all records without TTL from dynamodb? 如何使用Firebase Cloud Functions删除旧文件? - How to delete old files with Firebase Cloud Functions? elasticsearch node.js 删除索引的所有文档 - elasticsearch node.js delete all docs of an index
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM