# Can a scripted field be mapped as a geo\_point

**URL:** <https://discuss.elastic.co/t/can-a-scripted-field-be-mapped-as-a-geo-point/171655>\
**Category:** Kibana\
**Created:** [March 11, 2019, 2:49am UTC](https://discuss.elastic.co/t/can-a-scripted-field-be-mapped-as-a-geo-point/171655 "2019-03-11T02:49:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahul\_bhagwat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_bhagwat/32/41748_2.png) [@rahul\_bhagwat](https://discuss.elastic.co/u/rahul_bhagwat)\
**Post date:** [March 11, 2019, 2:49am UTC](https://discuss.elastic.co/t/can-a-scripted-field-be-mapped-as-a-geo-point/171655/1 "2019-03-11T02:49:02Z")

</div>

I have some log files with latitude and longitude data in different rows, i created a scripted field which concatenated the data of these two rows but i am unable to save this field as a geo\_point to visualise it. How can i go about solving this issue.

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [March 11, 2019, 10:18pm UTC](https://discuss.elastic.co/t/can-a-scripted-field-be-mapped-as-a-geo-point/171655/2 "2019-03-11T22:18:29Z")

</div>

It doesn't look like Painless supports geo as a [primitive type](https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-types.html#primitive-types), and Kibana only supports that type (in an even more simplified format, all number types are just "number").

Most likely you'll want to set this value at index time instead of trying to enhance it at query time. This is probably most easily done with an [ingest pipeline](https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest.html). The gist is that you'd index documents into that pipeline, instead of directly into Elasticsearch, and let it enrich the document at index time. If you're just trying to concatenate two field values into a new field, that should be pretty easy to set up.

For existing documents, you can updating them with the [Reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 8, 2019, 10:23pm UTC](https://discuss.elastic.co/t/can-a-scripted-field-be-mapped-as-a-geo-point/171655/3 "2019-04-08T22:23:34Z")

</div>

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