Description
Elastic.Clients.Elasticsearch version: 8.18.1
Elasticsearch version: 8.6.1
.NET runtime version: .net9
Operating system version: not sure. Elastic cloud
Description of the problem including expected versus actual behavior:
I upgrade my library from 8.17.4 to 8.18.1. One of the breaking changes around the upgrade was to change TypeMapping.DynamicTemplates
from ICollection<IDictionary<string, DynamicTemplate>>
to a ICollection<KeyValuePair<string, DynamicTemplate>>
collection.
Now when trying to create a new index, I get this error:
{"Request failed to execute. Call: Status code 400 from: PUT /ptest_blog1_articles?pretty=true&error_trace=true. ServerError: Type: mapper_parsing_exception Reason: "Failed to parse mapping: A dynamic template must be defined with a name" CausedBy: "Type: mapper_parsing_exception Reason: "A dynamic template must be defined with a name"""}
Steps to reproduce:
- Create an index with at least one Dynamic Template and you should run into the error.
Expected behavior
I should be able to create the index. I am guessing there is an issue with the request serializer which is not converting the key in the KeyValuePair<>
to template name.