# Getting to geo\_point types for maps

**URL:** <https://discuss.elastic.co/t/getting-to-geo-point-types-for-maps/268405>\
**Category:** Elasticsearch\
**Created:** [March 25, 2021, 7:16pm UTC](https://discuss.elastic.co/t/getting-to-geo-point-types-for-maps/268405 "2021-03-25T19:16:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snobysmake](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@snobysmake](https://discuss.elastic.co/u/snobysmake)\
**Post date:** [March 25, 2021, 7:16pm UTC](https://discuss.elastic.co/t/getting-to-geo-point-types-for-maps/268405/1 "2021-03-25T19:16:12Z")

</div>

I'm trying to create a template before creating the index so that we can get to display location on maps.  
We have multiple AWS Load Balancer and want to look from where traffic is coming from.

We use ElasticSearch Version 7.10.2

Index preferred name is alb-index-proj1, alex-index-proj2

Template I have is

```auto
{
        "order": 0,
        "template": "alb-index-*",
        "settings": {},
        "mappings": {
                "_default_": {
                        "properties": {
                                "location": {
                                        "type": "geo_point"
                                }
                        }
                }
        }
}

```

This is what happens when I tried to import through the Dev Console,

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "mapper_parsing_exception",
        "reason" : "Root mapping definition has unsupported parameters: [_default_ : {properties={location={type=geo_point}}}]"
      }
    ],
    "type" : "mapper_parsing_exception",
    "reason" : "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [_default_ : {properties={location={type=geo_point}}}]",
    "caused_by" : {
      "type" : "mapper_parsing_exception",
      "reason" : "Root mapping definition has unsupported parameters: [_default_ : {properties={location={type=geo_point}}}]"
    }
  },
  "status" : 400
}

```

Can you help me find what I'm doing wrong here. Thank you!

---

<div class="post-metadata">

**Author:** ![snobysmake](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@snobysmake](https://discuss.elastic.co/u/snobysmake)\
**Post date:** [March 25, 2021, 7:21pm UTC](https://discuss.elastic.co/t/getting-to-geo-point-types-for-maps/268405/2 "2021-03-25T19:21:47Z")

</div>

Duh! This is the correct way.

```auto
PUT /_template/alb-index-geolocation
{
        "order": 0,
        "template": "aws-index-*",
        "settings": {},
        "mappings": {
                        "properties": {
                                "location": {
                                        "type": "geo_point"
                                }
                        }
        }
}

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 25, 2021, 11:54pm UTC](https://discuss.elastic.co/t/getting-to-geo-point-types-for-maps/268405/3 "2021-03-25T23:54:02Z")

</div>

Thanks for sharing your solution!

---

<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:** [April 22, 2021, 11:54pm UTC](https://discuss.elastic.co/t/getting-to-geo-point-types-for-maps/268405/4 "2021-04-22T23:54:43Z")

</div>

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