# Elasticsearch 7.x and geo\_point Type: can not do it via index\_template mapping?

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-x-and-geo-point-type-can-not-do-it-via-index-template-mapping/204544>\
**Category:** Elasticsearch\
**Created:** [October 21, 2019, 7:58pm UTC](https://discuss.elastic.co/t/elasticsearch-7-x-and-geo-point-type-can-not-do-it-via-index-template-mapping/204544 "2019-10-21T19:58:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lrsmith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lrsmith/32/56284_2.png) [@lrsmith](https://discuss.elastic.co/u/lrsmith)\
**Post date:** [October 21, 2019, 7:58pm UTC](https://discuss.elastic.co/t/elasticsearch-7-x-and-geo-point-type-can-not-do-it-via-index-template-mapping/204544/1 "2019-10-21T19:58:48Z")

</div>

I have an ES 7.1 cluster running locally. I forward some AWS ELB logs to it, via logstash. I am getting geoip data, but I want to use a Kibana visualization that relies on geo\_point data type. RIght now I get an error in Kibana about not having geo\_point in the index.

I use index\_templates and I declare a mapping section to define location as a geo\_point. It applies correctly, but when I check the index template it has no mappings associated with it. curl fragments below.

I am assuming and want to verify that this is because mapping types were remove in 7.x? and I will need to do this via in ingestion pipeline or at the logstash level?

## Index Template

```
_template/test_template" -H 'Content-Type: application/json' -d'
{
  "index_patterns": ["test_*"],
  "settings": {
      "number_of_shards": "2",
      "number_of_replicas": "2"
    }
  },
  "mappings" : {
    "dynamic_templates" : [ {
      "message_field" : {
        "path_match" : "message",
        "match_mapping_type" : "string",
        "mapping" : {
          "type" : "text",
          "norms" : false
        }
      }
    }, {
      "string_fields" : {
        "match" : "*",
        "match_mapping_type" : "string",
        "mapping" : {
          "type" : "text", "norms" : false,
          "fields" : {
            "keyword" : { "type": "keyword", "ignore_above": 256 }
          }
        }
      }
    } ],
    "properties" : {
      "@timestamp": { "type": "date"},
      "@version": { "type": "keyword"},
      "geoip" : {
        "dynamic": true,
        "properties" : {
          "ip": { "type": "ip" },
          "location" : { "type" : "geo_point" },
          "latitude" : { "type" : "half_float" },
          "longitude" : { "type" : "half_float" }
        }
      }
    }
  }

  "aliases": {}
}'

```

## Index template check

```
_template/test_template | jq .
{
  "test_template": {
    "order": 0,
    "index_patterns": [
      "test_*"
    ],
    "settings": {
      "index": {
        "number_of_shards": "2",
        "number_of_replicas": "2"
      }
    },
    "mappings": {},
    "aliases": {}
  }
}
```

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [October 21, 2019, 8:55pm UTC](https://discuss.elastic.co/t/elasticsearch-7-x-and-geo-point-type-can-not-do-it-via-index-template-mapping/204544/2 "2019-10-21T20:55:31Z")

</div>

The body of your PUT index template is malformed. Delete line 6 - the extra `}`.  
Then you will need a comma just before `"aliases"`.

---

<div class="post-metadata">

**Author:** ![lrsmith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lrsmith/32/56284_2.png) [@lrsmith](https://discuss.elastic.co/u/lrsmith)\
**Post date:** [October 22, 2019, 2:46am UTC](https://discuss.elastic.co/t/elasticsearch-7-x-and-geo-point-type-can-not-do-it-via-index-template-mapping/204544/3 "2019-10-22T02:46:16Z")

</div>

Glen, Thank for that I see the mapping fields now. I'm see the mapping and the geoip.location is a geo\_point and I'm getting geoip.lattitude and geoip.longitude being set. I'm still having issues where Kibana isn't finding any type with geo\_point in the visualization.

---

<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 19, 2019, 2:46am UTC](https://discuss.elastic.co/t/elasticsearch-7-x-and-geo-point-type-can-not-do-it-via-index-template-mapping/204544/4 "2019-11-19T02:46:16Z")

</div>

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