Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gise88 opened this issue Aug 3, 2023 · 1 comment
Closed
Labels
8.x Relates to a 8.x client version Area: Specification Category: Bug

Comments

@gise88
Copy link

gise88 commented Aug 3, 2023

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);
@gise88 gise88 added the 8.x Relates to a 8.x client version label Aug 3, 2023
@flobernd
Copy link
Member

This is fixed in 8.13.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.x Relates to a 8.x client version Area: Specification Category: Bug
Projects
None yet
Development

No branches or pull requests

2 participants