ES 6.1 dynamic template with multiple match_mapping_type

Hi,

In previous versions a template like this worked fine:

    "other_fields": {
      "mapping": {
        "norms" : false,
        "type": "{dynamic_type}",
        "index": "true"
      },
      "match_mapping_type": "boolean|date|double|long|object",
      "match" : "*"
    }

But not anymore in 6.1 due to the following error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "mapper_parsing_exception",
        "reason" : "Failed to parse mapping [_default_]: No field type matched on [boolean|date|double|long|object], possible values are [object, string, long, double, boolean, date, binary]"
      }
    ],
    "type" : "mapper_parsing_exception",
    "reason" : "Failed to parse mapping [_default_]: No field type matched on [boolean|date|double|long|object], possible values are [object, string, long, double, boolean, date, binary]",
    "caused_by" : {
      "type" : "illegal_argument_exception",
      "reason" : "No field type matched on [boolean|date|double|long|object], possible values are [object, string, long, double, boolean, date, binary]"
    }
  },
  "status" : 400
}

Were there any changes related to this? I wasn't able to find much info.

Many thanks,

According to the doc:

Only the following datatypes can be automatically detected: boolean, date, double, long, object, string. It also accepts * to match all datatypes.

Does it mean from now we can only either match everything or invididual types and not a set of types?

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