我刚打酱油去了,不好意思

给text字段添加了个 keyword,那么旧数据怎么给keyword初始化,环境是es5.5

Elasticsearch | 作者 hong421 | 发布于2019年11月12日 | 阅读数:1769

给text字段添加了个 keyword,那么旧数据怎么给keyword初始化,环境是es5.5    用的是阿里的es  所以得在Kibana上执行,在不重建索引的情况下有办法么
 
PUT user_index/user_type/_mapping
{
"properties": {
"userNickName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
已邀请:

mobikarl

赞同来自:

The simplest usage of _update_by_query just performs an update on every document in the index without changing the source. This is useful to pick up a new property or some other online mapping change. Here is the API:
POST twitter/_update_by_query?conflicts=proceed
 

要回复问题请先登录注册