Skip to content

Deserialization error when try to convert relations field inside Join #7871

@gise88

Description

@gise88

Elastic.Clients.Elasticsearch version: 8.9.1

Elasticsearch version: 8.8.2

.NET runtime version: 7.0.1

Operating system version: Windows 10

Description of the problem including expected versus actual behavior:
Deserialization error when try to convert relations to the target property for "level2a" : "level3"

Steps to reproduce:

PUT _index_template/tests-bug
{
  "index_patterns": [
    "test-bug"
  ],
  "template": {
    "mappings": {
      "dynamic" : "strict",
      "properties" : {
        "joinCompanyField" : {
          "eager_global_ordinals" : true,
          "type" : "join",
          "relations" : {
            "level1" : ["level2a", "level2b"],
            "level2a" : "level3"
          }
        }
      }
    },
    "aliases": {}
  }
}

Of course the workaround here is to use the array syntax also for the second level: "level2a" : ["level3"]

Expected behavior
The GetIndexTemplateAsync should deserialize and return the index template. Code:

var res = await client
	.Indices
	.GetIndexTemplateAsync(new GetIndexTemplateRequest(new Name("tests-bug")), CancellationToken.None);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions