新增字段
PUT 索引名称 /_mapping/doc
PUT activity_v1/_mapping/doc
{
"properties": {
"effDate_fbda": {"type": "text"},
"expDate_fbda": {"type": "text"}
}
}
对新增字段赋值
POST 索引名称 /_update_by_query
POST activity_v1/_update_by_query
{
"script": {"source": "ctx._source.expDate_fbda=ctx._source.expDate"}
}