# GeoPoint object in groovy scripts, no results found in Kibana

**URL:** <https://discuss.elastic.co/t/geopoint-object-in-groovy-scripts-no-results-found-in-kibana/46576>\
**Category:** Elasticsearch\
**Created:** [April 6, 2016, 5:22pm UTC](https://discuss.elastic.co/t/geopoint-object-in-groovy-scripts-no-results-found-in-kibana/46576 "2016-04-06T17:22:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wels](https://avatars.discourse-cdn.com/v4/letter/w/c57346/32.png) [@wels](https://discuss.elastic.co/u/wels)\
**Post date:** [April 6, 2016, 5:22pm UTC](https://discuss.elastic.co/t/geopoint-object-in-groovy-scripts-no-results-found-in-kibana/46576/1 "2016-04-06T17:22:42Z")

</div>

How do I use the GeoPoint object in groovy scripts?

Here is my index mapping:

> "geoip": {  
> "properties": {  
> "location": {  
> "type": "geo\_point",  
> "lat\_lon": true  
> }  
> }  
> }

I have tried to assign the location with the longitude and latitude in my groovy script:  
doc.location = [lat: 51.503, lon: -0.127], and in Kibana, I see these fields in my index:  
location.lat 51.503  
location.lon -0.127

Now when I try to create a tile map, it sees the field geoip.location but on the map it says "No results found"

I'm wondering if I need to assign doc.location to a GeoPoint object instead of a groovy map?

---

<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:** [July 5, 2017, 11:01pm UTC](https://discuss.elastic.co/t/geopoint-object-in-groovy-scripts-no-results-found-in-kibana/46576/2 "2017-07-05T23:01:43Z")

</div>

Closed on July 5, 2017, 11:01pm UTC


