# Logstash 7.6 how to create geo\_point field

**URL:** <https://discuss.elastic.co/t/logstash-7-6-how-to-create-geo-point-field/221931>\
**Category:** Logstash\
**Created:** [March 3, 2020, 6:05pm UTC](https://discuss.elastic.co/t/logstash-7-6-how-to-create-geo-point-field/221931 "2020-03-03T18:05:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [March 3, 2020, 6:05pm UTC](https://discuss.elastic.co/t/logstash-7-6-how-to-create-geo-point-field/221931/1 "2020-03-03T18:05:39Z")

</div>

Hello,

I am using the geoip filter in order to do some geoip lookup and I would like to be able to use the kibana 7.6 maps to get data into the maps. The geoip lookup seam to be working however there is no geo\_point type field therefore the maps cannot recognize the data from the index.

The logstash7.6 code looks pretty simple:

```
geoip {
  source => "src.ip"
  target => "location"
}

```

The output seam to be OK as well:

```
"location" => {
  "longitude" => -77.0428,
  "location" => {
    "lon" => -77.0428,
    "lat" => -12.0464
   },
   "region_code" => "LMA",
   "timezone" => "America/Lima",
   "country_code2" => "PE",
   "latitude" => -12.0464,
   "continent_code" => "SA",
   "ip" => "some ip address",
   "country_code3" => "PE",
  "country_name" => "Peru",
  "city_name" => "Lima",
  "region_name" => "Lima"
},

```

However in kibana I cannot see the index pattern when I try to add a new document layer:

 ![Screenshot 2020-03-03 at 19.59.58](https://us1.discourse-cdn.com/elastic/original/3X/a/9/a9a498f19e6b1edfa6de103b381b256bbb01011e.png)

I have tried creating a mapping but using kibana dev tool but I am getting the following errors:

```
PUT buyldn-*/_mapping/my_type
{
  	"my_type": {
  		"properties": {
    		"location": {
    			"type": "geo_point"
    		}
    	}
    }
 }

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."
  },
  "status" : 400
}

```

Any idea how to make it work?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 3, 2020, 6:31pm UTC](https://discuss.elastic.co/t/logstash-7-6-how-to-create-geo-point-field/221931/2 "2020-03-03T18:31:09Z")

</div>

> [@zozo6015](#):
>
> Any idea how to make it work?

I would try removing the "my\_type": {} wrapper and just keep "properties".

---

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [March 3, 2020, 6:48pm UTC](https://discuss.elastic.co/t/logstash-7-6-how-to-create-geo-point-field/221931/3 "2020-03-03T18:48:29Z")

</div>

I get the same error. Most probably because elasticsearch has removed the type field support.

---

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [March 4, 2020, 12:30pm UTC](https://discuss.elastic.co/t/logstash-7-6-how-to-create-geo-point-field/221931/4 "2020-03-04T12:30:52Z")

</div>

> [@zozo6015](#):
>
> "lon" =\> -77.0428,

I seam to be able to add a mapping via:

```
PUT buyldn-2020.02.26
{
  "mappings": {
    "properties": {
      "location": {
        "type": "geo_point"
      }
    }
  }
}

```

---

<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 1, 2020, 12:30pm UTC](https://discuss.elastic.co/t/logstash-7-6-how-to-create-geo-point-field/221931/5 "2020-04-01T12:30:54Z")

</div>

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