Skip to content

Elastic.Transport.UnexpectedTransportException when using GetMappingAsync and dynamic_templates #8320

Closed
@gpetrou

Description

@gpetrou

Elastic.Clients.Elasticsearch version: 8.13.14

Elasticsearch version: 8.12.2

.NET runtime version: 8.0

Operating system version:

Description of the problem including expected versus actual behavior:
When calling GetMappingAsync with our template that contains dynamic_templates there is a The JSON value could not be converted to System.Collections.Generic.ICollection1[System.String]. Path: $ | LineNumber: 0 | BytePositionInLine: 11.` error.
This seems to be working just fine until version 8.13.13.

Steps to reproduce:
Use a template that contains dynamic_templates. For example,

"dynamic_templates": [
  {
    "test_template": {
      "match_mapping_type": "string",
      "path_match": "xyz.*",
      "mapping": {
        "index": true,
        "analyzer": "fulltext",
        "search_analyzer": "synonym_analyzer",
        "type": "text",
        "store": false
      }
    }
  }
],

Call elasticsearchClient.Indices.GetMappingAsync

Expected behavior
GetMappingAsync works as before.

Provide ConnectionSettings (if relevant):

Provide DebugInformation (if relevant):

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions