简体   繁体   English

从 Elasticsearch 删除数据 最大索引

[英]Delete Data from Elasticsearch Maxed out index

I have an single Elasticsearch index which has maximum number of documents.我有一个 Elasticsearch 索引,它具有最大的文档数。 i want to delete some data from this index.我想从此索引中删除一些数据。 i have tried running a delete_by_query but it fails.我试过运行 delete_by_query 但它失败了。 any sugestions for this, which i would able to keep the index and its data and also delete some old data from the same index?对此有何建议,我将能够保留索引及其数据并从同一索引中删除一些旧数据?

This is the request i was running.这是我正在运行的请求。

curl -X GET "1localhost:9200/produdtion-index/_search?pretty" -H 'Content-Type: application/json' -d'
{
  "query": {
                    "bool": {
                        "must": [
                            { "range": { "submitDate": { "lte": "20200421" } } }   
                        ]
                    }
                }
}
' 

Try index life cycle managementhttps://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html You can split the index based on the number of documents and then delete them尝试索引生命周期管理https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html 可以根据文档数拆分索引,然后删除

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM