Skip to content

Deserialization error on GetIndexTemplateAsync on 8.17.2, 8.17.3 versions #8479

@meriturva

Description

@meriturva

Elastic.Clients.Elasticsearch version: 8.17.2, 8.17.3

Elasticsearch version: 8.17.3

.NET runtime version: 8.0

Operating system version: linux

Description of the problem including expected versus actual behavior:
Asking index template we receive a deserialization error.

Here correct direct call:
GET _index_template/xxx-ft-it-documents
And correct response:

{
    "index_templates": [
        {
            "name": "xxx-ft-it-documents",
            "index_template": {
                "index_patterns": [
                    "xxx-ft-documents-*"
                ],
                "composed_of": [
                    "xxx-ft-ct-documents"
                ],
                "priority": 200,
                "version": 1
            }
        }
    ]
}

Instead of using client:

var indexTemplateResponse = await client.Indices.GetIndexTemplateAsync("xxx-ft-it-documents", TestContext.Current.CancellationToken);

Error:

Elastic.Transport.UnexpectedTransportException : The JSON value could not be converted to Elastic.Clients.Elasticsearch.Names. Path: $.index_templates[0].index_template.index_patterns | LineNumber: 5 | BytePositionInLine: 28.
---- System.Text.Json.JsonException : The JSON value could not be converted to Elastic.Clients.Elasticsearch.Names. Path: $.index_templates[0].index_template.index_patterns | LineNumber: 5 | BytePositionInLine: 28.

Thanks.

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