我有一个包含1年数据的索引。我想删除较旧的数据,并保留最近60天的数据。
我试过使用delete_query,它似乎可以工作,但它非常耗时。
看起来“策展人”是最好的方式。
所以,我做了这样的配置:
actions:
1:
action: delete_indices
description: >-
Delete indices older than 60 days.
options:
ignore_empty_list: True
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: myindex*
- filtertype: age
source: field_stats
direction: older
unit: days
unit_count: 60
field: '@timestamp'
stats_result: min_value并与策展人cli一起发布。
版本: curator 5.8和elasticsearch 6.5
结果不是预期的结果!
如果存在超过60天的数据,则删除整个索引,而不是仅删除超过60天的数据。你能帮我拿一下吗?
发布于 2020-08-20 00:46:48
Curator仅删除整个索引。从一开始就是这样。您有两个选择:坚持使用delete by query,或者将数据拆分成多个索引,以便随着时间的推移以块(整个索引)的形式过期。由于滚动索引由单个别名支持,因此您的搜索仍将看到整个数据集(使用别名进行搜索时)。
https://stackoverflow.com/questions/63472890
复制相似问题