使用kibana中的graph功能时报了fielddata的错误,需要将fielddata改为ture,不知道怎么操作?
Kibana | 作者 taowenrui | 发布于2017年09月13日 | 阅读数:6891
这个是grap的错误Error 400 Bad Request: Fielddata is disabled on text fields by default. Set fielddata=true on [host] in order
to load fielddata in memory by uninverting the inverted index. Note that this can however use significant
memory. Alternatively use a …
我看一下官网的解决方案
PUT my_index/_mapping/my_type { "properties": { "my_field": { "type": "text", "fielddata": true } } }
然后自己更加自己的对应的index,type,filed,进行修改,我的执行语句是:
PUT logstash-2017.09.12/_mapping/log
{
"properties": {
"message": {
"type": "text",
"fielddata": true
}
}
}
index :logstash-2017.09.12 type : log filed : message (这个是日志信息)
然后就报错了
信息:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Mapper for [message] conflicts with existing mapping in other types:\n[mapper [message] has different [norms] values, cannot change from disable to enabled]"
}
],
"type": "illegal_argument_exception",
"reason": "Mapper for [message] conflicts with existing mapping in other types:\n[mapper [message] has different [norms] values, cannot change from disable to enabled]"
},
"status": 400
本人是es的小白,刚刚搭建好环境,求大神提供解决方案, 怎样可以使用 graph功能达到这种效果
to load fielddata in memory by uninverting the inverted index. Note that this can however use significant
memory. Alternatively use a …
我看一下官网的解决方案
PUT my_index/_mapping/my_type { "properties": { "my_field": { "type": "text", "fielddata": true } } }
然后自己更加自己的对应的index,type,filed,进行修改,我的执行语句是:
PUT logstash-2017.09.12/_mapping/log
{
"properties": {
"message": {
"type": "text",
"fielddata": true
}
}
}
index :logstash-2017.09.12 type : log filed : message (这个是日志信息)
然后就报错了
信息:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Mapper for [message] conflicts with existing mapping in other types:\n[mapper [message] has different [norms] values, cannot change from disable to enabled]"
}
],
"type": "illegal_argument_exception",
"reason": "Mapper for [message] conflicts with existing mapping in other types:\n[mapper [message] has different [norms] values, cannot change from disable to enabled]"
},
"status": 400
本人是es的小白,刚刚搭建好环境,求大神提供解决方案, 怎样可以使用 graph功能达到这种效果
3 个回复
xinfanwang
赞同来自:
fielddata非常耗内存,不是必要不要用。你这样message可能很长,要整体做一个term来用?不可能吧!
这个图一定是解析了Host了。Host字段的mapping你可以直接定义为keyword就行。不用fielddata.
xiaoke - http://blog.51cto.com/kexiaoke
赞同来自:
JonRambo
赞同来自: