Unknown setting exception for "type"="date", "format": "year_month_day" in elastic search 5.5.0

I am new to elastic search, I was going through this video : https://www.elastic.co/webinars/getting-started-elasticsearch.

Installed elasticsearch-5.5.0 (linux 64 bit) and kibana 5.5.0 and xpack.

When I create the index using the following command, I am getting an error.

PUT /dates
{
  "settings": {
    "index": {
      "number_of_shards": 2,
      "number_of_replicas": 0
    },
    "mappings": {
      "birth-date": {
        "properties": {
          "dob": {
            "type": "date",
            "format": "year_month_day"
          }
        }
      }
    }
  }
}

ERROR:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "unknown setting [index.mappings.birth-date.properties.dob.format] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "unknown setting [index.mappings.birth-date.properties.dob.format] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
  },
  "status": 400
}

As mentioned in the response I tried searching in breaking changes, but unable to find the reason anywhere.

1 Like

I think your closing curly braces are misaligned. The key mappings should be at the same nesting as settings.

Thanks. This was the issue.
I have updated the examples as per webinar in this gitlab example repo: https://github.com/jayakrishnankk/examples/tree/master/getting-started which is a clone of https://github.com/elastic/examples

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