Elasticsearch deletes index command according to condition
In the past, it was deleted according to the id of the document in the index. In fact, Elasticsearch supports deletion based on conditions:
Delete the eligible record of a type in the index:
Curl-XDELETE http://localhost:9200/indexname/typename/_query?pretty-d'{"query": {"filtered": {"filter": {"bool": {"must": {"range": {"logtime": {"gt": "20171214235459" "lt": "20171215235959"}
Delete all eligible records in the index:
Curl-XDELETE http://localhost:9200/indexname/_query?pretty-d'{"query": {"filtered": {"filter": {"bool": {"must": {"range": {"logtime": {"gt": "20171214235459" "lt": "20171215235959"}