Skip to content

Client cannot deserialize string to list of strings #8190

Closed
@matteocalisti

Description

@matteocalisti

Elastic.Clients.Elasticsearch version: 8.13.12

Elasticsearch version: 8.13.2

.NET runtime version: net6.0

Operating system version: Windows 10

Description of the problem including expected versus actual behavior:
Using timeseries mode on a backing index of a datastream serializes a list of strings with a single string as an individual string, not as an array of strings. The client fails to deserialize the source document because of this.

Steps to reproduce:

  1. Clone this example repo
  2. Change the field elasticsearchAddress in both test classes to point to a 8.13.x instance of Elasticsearch
  3. Execute tests: 3 of them are ok, 1 fails

Expected behavior
Elasticsearch serializes a list of string as an individual string, the client should be able to deserialize the single string to the original C# type (a list of strings) with a single string.

Is the mapping correct for this type of scenario?

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