# Geo.location as object and not as geo\_point

**URL:** https://discuss.elastic.co/t/geo-location-as-object-and-not-as-geo-point/349230
**Category:** Logstash
**Created:** [December 13, 2023, 7:59am UTC](https://discuss.elastic.co/t/geo-location-as-object-and-not-as-geo-point/349230 "2023-12-13T07:59:56Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![helldunkel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/helldunkel/32/133097_2.png) [@helldunkel](https://discuss.elastic.co/u/helldunkel)
#### Post date: [December 13, 2023, 7:59am UTC](https://discuss.elastic.co/t/geo-location-as-object-and-not-as-geo-point/349230/1 "2023-12-13T07:59:56Z")

</div>

Hi,

I created a component template for a custon sensor. everything works, has the right datatypes. Only destination.geo.location is set to object and not to geo\_point:

```auto
    "destination": {
      "type": "object",
      "properties": {
        "geo": {
          "type": "object",
          "properties": {
            "continent_name": {
              "type": "keyword"
            },
            "region_iso_code": {
              "type": "keyword"
            },
            "city_name": {
              "type": "keyword"
            },
            "country_iso_code": {
              "type": "keyword"
            },
            "timezone": {
              "type": "keyword"
            },
            "country_name": {
              "type": "keyword"
            },
            "name": {
              "type": "keyword"
            },
            "location": {
              "type": "geo_point"
            },
            "region_name": {
              "type": "keyword"
            },
            "postal_code": {
              "type": "keyword"
            }
          }
        },
        "port": {
          "type": "long"
        },
        "ip": {
          "type": "ip"
        },
        "interface": {
          "type": "keyword"
        },
        "mac": {
          "type": "keyword"
        }
      }

```

If I look to other templates the settings for that point are the same, but this entry is set to geo\_point

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [December 13, 2023, 9:36am UTC](https://discuss.elastic.co/t/geo-location-as-object-and-not-as-geo-point/349230/2 "2023-12-13T09:36:13Z")

</div>

I don't understand. Here it's a `geo_point`. Is not what you want?

---

<div class="post-metadata">

### Author: ![helldunkel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/helldunkel/32/133097_2.png) [@helldunkel](https://discuss.elastic.co/u/helldunkel)
#### Post date: [December 13, 2023, 1:26pm UTC](https://discuss.elastic.co/t/geo-location-as-object-and-not-as-geo-point/349230/3 "2023-12-13T13:26:04Z")

</div>

of course, I want a geo\_point.

Here are the things i don´t understand:

There is a conflict:

 ![geo](https://us1.discourse-cdn.com/elastic/original/3X/7/1/71bb764efd7dbb038f5110b059df17cf180007cf.png)

only wiht the new indices I create with the shown template:

 ![geo2](https://us1.discourse-cdn.com/elastic/original/3X/9/4/944a279d486ff59d893764a180217bc1e99219ee.png)

And I can´t see the destination.geo and source.geo in the maps visualisation.  
 ![geo3](https://us1.discourse-cdn.com/elastic/original/3X/7/6/761bf79007d30fcb2ca9be4e04b245dccc0646db.png)

My thinking is, the point is the conflict why this not working.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 4, 2024, 11:48am UTC](https://discuss.elastic.co/t/geo-location-as-object-and-not-as-geo-point/349230/4 "2024-01-04T11:48:44Z")

</div>

You can't indeed define a data view if you have multiple types for the same field.  
You need to either exclude the index which does not have a `geo_point` type for the field `destination.geo.location` or remove this index (which will remove the data) or reindex the data from this wrong index to a new one.

---

<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: [February 1, 2024, 11:49am UTC](https://discuss.elastic.co/t/geo-location-as-object-and-not-as-geo-point/349230/5 "2024-02-01T11:49:12Z")

</div>

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