# Newbie creating Elasticstack data with geo\_point

**URL:** <https://discuss.elastic.co/t/newbie-creating-elasticstack-data-with-geo-point/70462>\
**Category:** Elasticsearch\
**Created:** [January 3, 2017, 4:53pm UTC](https://discuss.elastic.co/t/newbie-creating-elasticstack-data-with-geo-point/70462 "2017-01-03T16:53:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrbruno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mrbruno/32/14272_2.png) [@mrbruno](https://discuss.elastic.co/u/mrbruno)\
**Post date:** [January 3, 2017, 4:53pm UTC](https://discuss.elastic.co/t/newbie-creating-elasticstack-data-with-geo-point/70462/1 "2017-01-03T16:53:36Z")

</div>

I'm rather new to Elasticsearch and am trying to create data with a geo\_point it it, similar to the example of log data that I saw in the [Loading Sample Data tutorial](https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html). I am doing the following:

```
 curl -XPUT localhost:9200/foo-2016-12-15 -d '{
  "mappings": {
    "log": {
      "properties": {
        "coords": {
          "type": "geo_point"
        }
      }
    }
  }
}'
curl -XPUT 'localhost:9200/foo-2016-12-15/external/1481830503?pretty&pretty' -d '{
  "status": "True",
  "datacenter": "pok",
  "slack": "False",
  "lognum": 80055,
  "@timestamp": "2016-12-15T19:35:03.000Z",
  "flow": "Manager",
  "secs": 1481830503.0,
  "coords": {
    "lat": 41.7003713,
    "lon": -73.9209701
  }
}'

```

This fails for me with:

```
{
  "error" : {
    "root_cause" : [
      {
        "type" : "remote_transport_exception",
        "reason" : "[D2phcF7][127.0.0.1:9300][indices:data/write/index[p]]"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "[coords] is defined as an object in mapping [external] but this name is already used for a field in other types"
  },
  "status" : 400
}

```

What am I doing wrong? I would be happy to change the mapping or data as long as I can get it to work.

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [January 3, 2017, 4:55pm UTC](https://discuss.elastic.co/t/newbie-creating-elasticstack-data-with-geo-point/70462/2 "2017-01-03T16:55:50Z")

</div>

Your mapping is defined for a document of type "log" but your document is of the type "external".

---

<div class="post-metadata">

**Author:** ![mrbruno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mrbruno/32/14272_2.png) [@mrbruno](https://discuss.elastic.co/u/mrbruno)\
**Post date:** [January 3, 2017, 7:05pm UTC](https://discuss.elastic.co/t/newbie-creating-elasticstack-data-with-geo-point/70462/3 "2017-01-03T19:05:58Z")

</div>

Thanks, that helped. I got it working!

---

<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 31, 2017, 7:06pm UTC](https://discuss.elastic.co/t/newbie-creating-elasticstack-data-with-geo-point/70462/4 "2017-01-31T19:06:27Z")

</div>

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