# Faield to parse geo\_point

**URL:** <https://discuss.elastic.co/t/faield-to-parse-geo-point/212816>\
**Category:** Elasticsearch\
**Created:** [December 23, 2019, 7:25am UTC](https://discuss.elastic.co/t/faield-to-parse-geo-point/212816 "2019-12-23T07:25:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AsfK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asfk/32/58995_2.png) [@AsfK](https://discuss.elastic.co/u/AsfK)\
**Post date:** [December 23, 2019, 7:25am UTC](https://discuss.elastic.co/t/faield-to-parse-geo-point/212816/1 "2019-12-23T07:25:01Z")

</div>

EDIT: ES version: 7.4.2

I have a mapping contains a `coordinate` of type `geo_point`, like this:

```
"coordinates": {
    "type": "geo_point"
}

```

I'm sending a POST command (using Postman) with correct syntex:

`"coordinates": [-18.341493, 34.143728]`

But got a parser exception:

```
 {
     "error": {
         "root_cause": [
             {
                 "type": "parse_exception",
                 "reason": "geo_point expected"
             }
         ],
         "type": "mapper_parsing_exception",
         "reason": "failed to parse field [coordinates] of type [geo_point]",
         "caused_by": {
             "type": "parse_exception",
             "reason": "geo_point expected"
         }
     },
     "status": 400
 }

```

Any idea why I got this error? Thanks!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 23, 2019, 7:29am UTC](https://discuss.elastic.co/t/faield-to-parse-geo-point/212816/2 "2019-12-23T07:29:25Z")

</div>

Which version of Elasticsearch are you using?

---

<div class="post-metadata">

**Author:** ![AsfK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asfk/32/58995_2.png) [@AsfK](https://discuss.elastic.co/u/AsfK)\
**Post date:** [December 23, 2019, 7:31am UTC](https://discuss.elastic.co/t/faield-to-parse-geo-point/212816/3 "2019-12-23T07:31:00Z")

</div>

7.4.2, thanks!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 23, 2019, 7:32am UTC](https://discuss.elastic.co/t/faield-to-parse-geo-point/212816/4 "2019-12-23T07:32:34Z")

</div>

Can you please show us the full document and mapping?

---

<div class="post-metadata">

**Author:** ![AsfK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asfk/32/58995_2.png) [@AsfK](https://discuss.elastic.co/u/AsfK)\
**Post date:** [December 23, 2019, 7:37am UTC](https://discuss.elastic.co/t/faield-to-parse-geo-point/212816/5 "2019-12-23T07:37:26Z")

</div>

of course, tnx! (upload part of them because they are very long, if need all of them please let me know...)

**Mapping:**

```
{
	"order": 0,
	"version": 300,
	"index_patterns": ["cells-sites-*"],
	"settings": {
		"number_of_shards": 4,
		"max_script_fields": 160
	},
	"mappings": {
		"dynamic": "strict",
		"properties": {
			"Type": {
				"type": "keyword"
			},
			"id": {
				"type": "keyword"
			},
			"coordinates": {
				"type": "geo_point"
			},
			"name": {
				"type": "keyword"
			},
			"siteId": {
				"type": "keyword"
			},
			"market": {
				"type": "keyword"
			},
			"cells": {
				"type": "nested",
				"dynamic": "strict",
				"properties": {
					"siteCoordinates": {
						"type": "geo_point"
					},
					"id": {
						"type": "long"
					},
					"name": {
						"type": "keyword"
					},
					"useid": {
						"type": "keyword"
					},
					"dx": {
						"type": "float"
					},
					"dy": {
						"type": "float"
					},
					"azimuth": {
						"type": "float"
					},
					"beamWidth": {
						"type": "float"
					},
					..... ETC ....
					"speed": {
						"type": "long"
					},
					"technology":{
                         "type":"keyword"
                    }
				}
			}
		}
	},
	"aliases": {}

```

}

Start of the **Documnet** :

```
{
	"name": "AutomationCells",
	"id": "1",
	"siteId": "1000001",
	"coordinates": [-18.341493, 34.143728],
	"market": "Automation",
	"cells": [
		{
			"siteCoordinates": [
				-18.3414932,
				34.1437282
			],
			"id": 1,
			"name": "pucchValidPuschValid1",
			"useid": "171624.A.700.4G.12",
			"dx": 0,
			"dy": 0,
			"azimuth": 0,
			"beamWidth": 0,
			...
			"speed": 1000000000
		},
		{
			"siteCoordinates": [
				-11.614932,
				34.1437282
			],
			"id": 2,
			"name": "pucchValidPuschValid2",
			"useid": "171624.A.700.4G.12",
			"dx": 0,
			"dy": 0,
			"azimuth": 0,
			"beamWidth": 0,
			...
			"speed": 1000000000
		}...

```

Thank you! 🙏

---

<div class="post-metadata">

**Author:** ![AsfK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asfk/32/58995_2.png) [@AsfK](https://discuss.elastic.co/u/AsfK)\
**Post date:** [December 24, 2019, 9:25am UTC](https://discuss.elastic.co/t/faield-to-parse-geo-point/212816/7 "2019-12-24T09:25:54Z")

</div>

Finally found the reason, the POST not failed due to geo\_point parsing error but due to "Removal of mapping types", I send `/sites` instead of '/\_doc/sites' (the error is wrong 😉)

[Link for doc](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/removal-of-types.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:** [January 21, 2020, 9:26am UTC](https://discuss.elastic.co/t/faield-to-parse-geo-point/212816/8 "2020-01-21T09:26:05Z")

</div>

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