Date format strings are no longer interchangeable between snake_case and camelCase

After upgrading from ES 7.5.2 to 7.6.1, I found that a date format string of dateOptionalTime is no longer interchangeable with date_optional_time. In 7.5.2 this works fine. In 7.6.2 (and subsequently confirmed the same problem in 7.7.1), however, I get the following error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Mapper for [vehicles.created_at] conflicts with existing mapping:\n[mapper [vehicles.created_at] has different [format] values]"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Mapper for [vehicles.created_at] conflicts with existing mapping:\n[mapper [vehicles.created_at] has different [format] values]"
  },
  "status" : 400
}

I searched existing issues and did not see any mention of this. The following Kibana commands can be used to reproduce the problem in 7.6.2 or 7.7.1. They work fine in 7.5.2:

DELETE /example

PUT /example

PUT /example/_mapping
{
  "properties": {
  "vehicles" : {
          "type" : "nested",
          "properties" : {
            "created_at" : {
              "type" : "date",
              "format" : "dateOptionalTime"
            }
          }
        }
  }
}

PUT /example/_mapping
{
  "properties": {
  "vehicles" : {
          "type" : "nested",
          "properties" : {
            "created_at" : {
              "type" : "date",
              "format" : "date_optional_time"
            }
          }
        }
  }
}
1 Like

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