Elasticsearch对type的删除操作,版本不同,对应的操作有所不同,今天给大家科普一下5.X版本对type的删除操作:

# hot_rank是index / sina_hot_search_rank是type
curl -XPOST 'localhost:9200/hot_rank/sina_hot_search_rank/_delete_by_query?conflicts=proceed&pretty' -H 'Content-Type: application/json' -d'
{
  "query": {
    "match_all": {}
  }
}
'

这样,整个type中的数据将被全部清空,所以要慎重~

  

相关文章:

  • 2021-11-27
  • 2022-03-08
  • 2021-07-20
  • 2021-09-23
  • 2022-12-23
  • 2021-11-30
  • 2022-01-20
猜你喜欢
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
相关资源
相似解决方案