# Need help with : failed to find geo\_point field

**URL:** <https://discuss.elastic.co/t/need-help-with-failed-to-find-geo-point-field/50492>\
**Category:** Elasticsearch\
**Created:** [May 19, 2016, 8:06pm UTC](https://discuss.elastic.co/t/need-help-with-failed-to-find-geo-point-field/50492 "2016-05-19T20:06:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaykeren](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@shaykeren](https://discuss.elastic.co/u/shaykeren)\
**Post date:** [May 19, 2016, 8:06pm UTC](https://discuss.elastic.co/t/need-help-with-failed-to-find-geo-point-field/50492/1 "2016-05-19T20:06:09Z")

</div>

Hi,  
I'm using the following mapping(Node.Js):  
function initMapping() {  
return elasticClient.indices.putMapping({  
index: indexName,  
type: "marker",  
body: {  
properties: {  
name: { type: "string" },  
location: { type: "geo\_point" },  
}  
}  
});  
}  
Inserting looks like (using Sense):  
PUT /randomindex/marker/7  
{  
"name": "hooooo",  
"location": {  
"lat": 40.722,  
"lon": -73.989  
}  
}

Searching looks like:  
GET /randomindex/marker/\_search  
{  
"query": {  
"filtered" : {  
"filter": {  
"geo\_distance": {  
"distance": "1000km",  
"location":{  
"lat":40.722,  
"lon":-73.989  
}

```
            }     
        }
    }
}

```

}  
by doing this I'm getting the following error: "failed to find geo\_point field [location]"  
what Am I doing wrong?

Thanks!!

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [May 24, 2016, 6:44am UTC](https://discuss.elastic.co/t/need-help-with-failed-to-find-geo-point-field/50492/2 "2016-05-24T06:44:32Z")

</div>

Hi @shaykeren,

I guess you are using Elasticsearch 1.7.

I tried the following with Elasticsearch 1.7.1 in Sense and it works as expected for me:

```auto
PUT randomindex
{
   "mappings": {
      "marker": {
         "properties": {
            "name": {
               "type": "string"
            },
            "location": {
               "type": "geo_point"
            }
         }
      }
   }
}

```

```auto
PUT /randomindex/marker/7
{
   "name": "hooooo",
   "location": {
      "lat": 40.722,
      "lon": -73.989
   }
}

```

```auto
GET /randomindex/marker/_search
{
   "query": {
      "filtered": {
         "filter": {
            "geo_distance": {
               "distance": "1000km",
               "location": {
                  "lat": 40.722,
                  "lon": -73.989
               }
            }
         }
      }
   }
} 

```

- Is the mapping as you'd expect it? Check this with `GET /randomindex/_mapping`
- Is the document actually inserted? Check this with `GET /randomindex/marker/7`
- Maybe you have also a very high refresh\_interval? For testing purposes you can issue `POST /randomindex/_refresh` after you have inserted the document. If it is found now, you should probably decrease your refresh interval.

I hope this hints help you.

Daniel

---

<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, 10:49pm UTC](https://discuss.elastic.co/t/need-help-with-failed-to-find-geo-point-field/50492/3 "2017-07-05T22:49:39Z")

</div>


