How to create Scripted field to create a column in Geo json format?

Hi, I have created an index with field location of type Geo_point in the Kibana console. I do not want to configure the logstash config file to create the location filed in geo json format.

Instead I want to create a scripted field for the field name Location.

When I create it using type string it the lat and long values correctly come as - 23.565, 78.909.

But when I create it using the type number, only the first value is given - 23.565.

My Scripted field screenshot using type Number is attached below,

Kindly help :pray:

You're using the number formatter, you should try using the default formatter or setting the field type to string.

Hi @wylie, after doing what you said I am getting a scripted filed in the required format, but it won't get mapped to the Geopoint field I've previously created right?

Right, a scripted field is a separate field. It's not possible to create scripted geopoints, because geopoints must be indexed.

1 Like

Thank you @wylie :smiley: