How to change type of field from Geo_Point to Text?

hey all, I have a problem, I put data into elastic type geo_point but the data had value "NaN, NaN" and 999,999. I get an error like :
'''
type: 'mapper_parsing_exception',
reason: 'failed to parse the [destinationLongLat] field of type [geo_point]',
caused_by: [Object]},
operation: {index: [Object]
'''
How change the data type of an existing index from geo_point to text?

You need to reindex, you can't change the mapping once it's been set and used unfortunately.

I would recommend cleaning up the data before indexing it instead as you otherwise will not be able to do any kind of geo analysis.

how about i make new field with changed mapping and delete the old field?

That'll work too :slight_smile:

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