, когда я пытаюсь удалить индекс customer
в Elasticsearch, но я обнаружил, что он не проверяет, есть ли какие-либо документы в моем Index
и удаляет мой Index
напрямую.
пытается выполнитьcmds:
# create index
curl -XPUT 'localhost:9200/customer?pretty'
# create doc
curl -XPUT 'localhost:9200/customer/external/1?pretty' -d'
{
"name": "The Night King"
}'
# query doc
curl -XGET 'localhost:9200/customer/external/1?pretty'
# try to delete index when there have a doc
curl -XDELETE 'localhost:9200/customer?pretty'
зачем удалять customer
напрямую без чека?
curl -XDELETE 'localhost:9200/customer?pretty'