es 修改mappings字段结构

es不支持直接修改mappings字段结构,可以通过_reindex 重建索引,方式修改

POST  _reindex
{
  "source": {
    "index": "old index"
  },
  "dest": {
    "index": "new index",
    "op_type": "create"
  }
}

Elasticsearch重建索引

数据量过大的时候,会报连接超时的异常,其实是kibana连接问题,内部一直在执行

{"statusCode":504,"error":"Gateway Time-out","message":"Client request timeout"}

可以通过

GET _tasks?actions=*reindex&detailed

查询重建索引的执行过程,如下图,看出总共700万数据,已经创建了57.6万

 

 


版权声明:本文为jiwei9877598原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。