Geo.location as object and not as geo_point

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:

    "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

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

of course, I want a geo_point.

Here are the things i don´t understand:

There is a conflict:

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

And I can´t see the destination.geo and source.geo in the maps visualisation.
geo3

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

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.

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