# Geo\_point expected - Elasticsearch version 7.3.2

**URL:** <https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495>\
**Category:** Elasticsearch\
**Created:** [September 28, 2019, 2:51pm UTC](https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495 "2019-09-28T14:51:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmariselvam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lmariselvam/32/54542_2.png) [@lmariselvam](https://discuss.elastic.co/u/lmariselvam)\
**Post date:** [September 28, 2019, 2:51pm UTC](https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495/1 "2019-09-28T14:51:20Z")

</div>

I'm trying to index a document with a valid "geo\_point" data, but I got an error saying "geo\_point expected". Can someone please advise?

Request:  
curl -X PUT "10.80.0.78:9200/production-index/mytype/mydocument1?pretty" -H 'Content-Type: application/json' -d'{"account":"170/170/653","location":[-74.104158,41.053954]}'

Output:  
{  
"error" : {  
"root\_cause" : [  
{  
"type" : "parse\_exception",  
"reason" : "geo\_point expected"  
}  
],  
"type" : "mapper\_parsing\_exception",  
"reason" : "failed to parse field [location] of type [geo\_point]",  
"caused\_by" : {  
"type" : "parse\_exception",  
"reason" : "geo\_point expected"  
}  
},  
"status" : 400  
}

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [September 28, 2019, 3:31pm UTC](https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495/2 "2019-09-28T15:31:56Z")

</div>

Can you try POST instead of PUT?

---

<div class="post-metadata">

**Author:** ![lmariselvam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lmariselvam/32/54542_2.png) [@lmariselvam](https://discuss.elastic.co/u/lmariselvam)\
**Post date:** [September 28, 2019, 3:36pm UTC](https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495/3 "2019-09-28T15:36:54Z")

</div>

@Ignacio_Vera  
I still receive the same error  
curl -X POST "10.80.0.78:9200/production-listings/listings/mydocument1?pretty" -H 'Content-Type: application/json' -d'{"account":"170/170/653","location":[-74.104158,41.053954]}'

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [September 28, 2019, 3:44pm UTC](https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495/4 "2019-09-28T15:44:23Z")

</div>

Unfortunately I cannot reproduce it, could you provide the mapping you are using?

---

<div class="post-metadata">

**Author:** ![lmariselvam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lmariselvam/32/54542_2.png) [@lmariselvam](https://discuss.elastic.co/u/lmariselvam)\
**Post date:** [September 28, 2019, 3:50pm UTC](https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495/5 "2019-09-28T15:50:52Z")

</div>

@Ignacio_Vera  
This is the mapping I'm using:  
[https://jsoneditoronline.org/?id=329a057fdd474c189f27f386317e9757](https://jsoneditoronline.org/?id=329a057fdd474c189f27f386317e9757)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 28, 2019, 4:03pm UTC](https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495/6 "2019-09-28T16:03:21Z")

</div>

> [@lmariselvam](#):
>
> curl -X POST "10.80.0.78:9200/production-listings/listings/mydocument1?pretty" -H 'Content-Type: application/json' -d'{"account":"170/170/653","location":[-74.104158,41.053954]}'

7.0+ must use the` _doc` type.... that is the issue I believe ([Removal of types](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html))

I just put in your mapping then posted the document, I think you have a leftover type `listings` in the URL

`curl -X POST "localhost:9200/production-listings/_doc/mydocument1?pretty" -H 'Content-Type: application/json' -d'{"account":"170/170/653","location": [-74.104158, 41.053954] }'`

Oh an just for clarity sake POST with providing document id is not really correct ...

PUT with \_id POST without so should be

`curl -X POST "localhost:9200/production-listings/_doc?pretty" -H 'Content-Type: application/json' -d'{"account":"170/170/653","location": [-74.104158, 41.053954] }'`

or

`curl -X PUT "localhost:9200/production-listings/_doc/mydocument1?pretty" -H 'Content-Type: application/json' -d'{"account":"170/170/653","location": [-74.104158, 41.053954] }`

Tested both worked

---

<div class="post-metadata">

**Author:** ![lmariselvam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lmariselvam/32/54542_2.png) [@lmariselvam](https://discuss.elastic.co/u/lmariselvam)\
**Post date:** [September 28, 2019, 4:17pm UTC](https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495/7 "2019-09-28T16:17:42Z")

</div>

Thank you @stephenb  
It worked. I was not aware of removal of types  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html)

---

<div class="post-metadata">

**Author:** ![Code\_Blog\_Money](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/code_blog_money/32/55385_2.png) [@Code\_Blog\_Money](https://discuss.elastic.co/u/Code_Blog_Money)\
**Post date:** [October 4, 2019, 9:11am UTC](https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495/8 "2019-10-04T09:11:28Z")

</div>

you can validate your JSON data at [https://jsonformatter.org](https://jsonformatter.org)

---

<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:** [November 1, 2019, 9:11am UTC](https://discuss.elastic.co/t/geo-point-expected-elasticsearch-version-7-3-2/201495/9 "2019-11-01T09:11:48Z")

</div>

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