Dynamic template create error in 8.14+ java, works in 8.12

When I try to create an index using a mapping that has a dynamic template that matches a type, I get this error:

[es/indices.create] failed: [mapper_parsing_exception] Failed to parse mapping: No field type matched on [[string]], possible values are [object, string, long, double, boolean, date, binary]

Here is example:

   "type_of_attribute": {
          "path_match": "attrs.*.type",
          "match_mapping_type": "string",
          "mapping": {
            "type": "keyword",
          }
        }

Works fine in 8.12.1 and seems to start failing with 8.14. It also works if I remove all type matching.

From Elastic Search to Elasticsearch

Could you share a full reproduction script please?

I am actually experiencing just the same as reported above.

I don't have a script to reproduce, but the exception as above pops up as soon as I call this method with this mapping and these settings.

Just tested with 8.15.1 as well, same behavior.

FYI, it works up to 8.13.4.

I have just discovered that the error as above was occurring because the ES cluster version was 8.11.3.
Upgrading to 8.15.1 solves the problem.

1 Like

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