I am trying to add condition Group by
in Grafana with Elasticsearch data source but I get the following error:
Fielddata is disabled on text fields by default
I tried to fix it by:
curl -XPUT 'localhost:9200/logstash-2017.06.07/_mapping/text?pretty' -H 'Content-Type: application/json' -d'
{
"properties": {
"beat.hostname": {
"type": "text",
"fielddata": true
}
}
}
'
But got the error:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Mapper for [beat.hostname] conflicts with existing mapping in other types:\n[mapper [beat.hostname] has different [norms] values, cannot change from disable to enabled, mapper [beat.hostname] is used by multiple types. Set update_all_types to true to update [omit_norms] across all types., mapper [beat.hostname] is used by multiple types. Set update_all_types to true to update [fielddata] across all types.]"
}
],
"type" : "illegal_argument_exception",
"reason" : "Mapper for [beat.hostname] conflicts with existing mapping in other types:\n[mapper [beat.hostname] has different [norms] values, cannot change from disable to enabled, mapper [beat.hostname] is used by multiple types. Set update_all_types to true to update [omit_norms] across all types., mapper [beat.hostname] is used by multiple types. Set update_all_types to true to update [fielddata] across all types.]"
},
"status" : 400
}
Any ideas how to fix that?