Geo_point type error in visualization

Hi,
I am getting error for geo_point type in kibana visualization because after every roll over of the index the destination.geo.location field changed to text type.(example roll over index name is my_index -000005)
PUT my_index-000005/_mapping
{
"properties" : {
"destination" : {
"properties" : {
"geo" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}
}
}
}
I want to change the type text to geo_point type in kibana devtool but showing below error.Please help me to how resolve the issue.
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "mapper [destination.geo.location] of different type, current_type [text], merged_type [geo_point]"
}
],
"type": "illegal_argument_exception",
"reason": "mapper [destination.geo.location] of different type, current_type [text], merged_type [geo_point]"
},
"status": 400
}

Thank you.

You need to look in the _template endpoint and find the applicable template mapping to change it.

Hey @warkolm,
she's asking about the problem after the rollover of the index happened, that's where she got the problem of setting field value true .
As far i knew the elastic, we don't set the field values for geo_point . But this is a wierd behaviour of elastic asking to set the field value for geo_point.

You can't change the mapping once it's been created. Hence you need to make sure you have a mapping template that will apply those changes automatically.

1 Like

You meant to say before creating the index pattern , I should define the template with the requried fields ?

Yes.

Thank you @warkolm

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.