"mapper_parsing_exception" Geo Point

Hi,

Can anyone tell why I'm getting an error here?

P.S: I'm Running latest ELK stack 7.17

This is what i'm pasting in dev's console

PUT /_template/storms
{
  "order": 0,
  "template": "storms*",
  "mappings": {
    "_default_": {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
}

Here is the error I'm getting

{
  "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
}

Regards,

UPDATE:

As I noticed that the default is deprecated In version 7 and up, I've removed it but still got some warning.

How can I update this to use index pattern?

PUT /_template/storms
{
  "order": 0,
  "template": "storms*",
  "mappings": {
    
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    
  }
}
#! Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-minimal-setup.html to enable security.
#! Legacy index templates are deprecated in favor of composable templates.
#! Deprecated field [template] used, replaced by [index_patterns]
{
  "acknowledged" : true
}

I'm trying to implement this example which imports data from mysql to elastic but as i can see it is old and not updated.

https://datascience-enthusiast.com/Miscellaneous/MySQL_to_ELK.html

The warning just says "template" is deprecated and you have to use "index_patterns":"storms*" instead.

Many thanks

1 Like

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