ElasticSearch增加字段
文章目录
新增字段
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"
}
}
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论