cerebro管理工具中添加elasticsearch字段
查看文档mapping
在cerebro中直接能看到index,但是无法直接查看type,
7.*版本的ES查看或者操作需要再url之后增加?include_type_name=true
如果type是唯一的,那么url前面的index(这里的news)可以不写,如果不是惟一的,其他的index中也有,就要写news/information/_mapping?include_type_name=true,用GET方式
向已有的type中新增字段
news/information/_mapping?include_type_name=true,要用PUT
数据:
{
"properties": {
"nvarietyid": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
成功后如图,之后再用上面查看mapping的方式就可以看到添加成功了