es清空索引数据

POST ads_iot_latest_index/_delete_by_query
{
  "query": { 
    "match_all": {
    }
  }
}

一个异常的解决

es清空索引数据_第1张图片

Caused by: ElasticsearchException[Elasticsearch exception [type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]]

PUT _settings
{
  "index": {
    "blocks": {
      "read_only_allow_delete": "false"
    }
  }
}

 

你可能感兴趣的:(大数据,es)