//新增字段
请求url:http://111.11.11.111:19200/es的index/_mapping/es的type/
请求方法:put
数据格式:
{
"es的type": {
"properties": {
"字段1": {
"type": "string"
},
"字段2": {
"type": "string"
}
}
}
}
//赋值
请求url:http://111.11.11.111:19200/es的type/_update_by_query/
请求方法:post
数据格式:
{
"script": {
"lang": "painless",
"inline": "ctx._source.字段= '值' "
}
}