Delete all documents from index/type without deleting type

后端 未结 15 504
耶瑟儿~
耶瑟儿~ 2020-12-04 09:45

I know one can delete all documents from a certain type via deleteByQuery.

Example:

curl -XDELETE \'http://localhost:9200/twitter/tweet/_query\' -d \         


        
15条回答
  •  南方客
    南方客 (楼主)
    2020-12-04 10:37

    Starting from Elasticsearch 2.x delete is not anymore allowed, since documents remain in the index causing index corruption.

提交回复
热议问题