Chi*_*h25 11
假设您的索引中有一些timestamp或creation date字段,您的查询将看起来像这样
DELETE /your_index/your_type/_query
{
"query": {
"range": {
"timestamp": {
"lte": "now-10y"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
这将删除超过10年的记录.
我希望这有帮助
将数据拆分为每日索引,并使用别名作为旧索引名称.然后每天删除每个索引.正如logstash:
每日指数:logstash-20151011,logstash-20151012,logstash-20151013.
完全别名:logstash
然后每天删除最后一个索引
| 归档时间: |
|
| 查看次数: |
15596 次 |
| 最近记录: |