在 kibana 中,如何在不从开发工具中删除索引的情况下删除索引中的所有文档
In kibana, how to delete all the documents in an Index without deleting the index from Dev tools
我想在不删除索引的情况下删除索引中的所有文档。如何实现?
你可以使用
POST /index-name-000001/_delete_by_query
{
"query": {
"match_all": {}
}
}
更多信息见
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
如果是一个非常大的索引添加,?conflicts=proceed,所以后台是运行。
POST my-index-000001/_delete_by_query?conflicts=proceed
{
"query": {
"match_all": {}
}
}
我想在不删除索引的情况下删除索引中的所有文档。如何实现?
你可以使用
POST /index-name-000001/_delete_by_query
{
"query": {
"match_all": {}
}
}
更多信息见 https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
如果是一个非常大的索引添加,?conflicts=proceed,所以后台是运行。
POST my-index-000001/_delete_by_query?conflicts=proceed
{
"query": {
"match_all": {}
}
}