Skip to content

ElasticsearchClient RequestResponseSerializer deserialization not setting value of wildcard query #7750

@Leandore

Description

@Leandore

Elastic.Clients.Elasticsearch version: 8.1.1

Elasticsearch version: 8.7.0

.NET runtime version: .Net 7

Operating system version: Windows 10

Description of the problem including expected versus actual behavior:
When deserializing a wild card search query using the RequestResponseSerializer.Deserialize method on ElasticsearchClient, the value of query is not being (although the name of the filter is). The expected outcome, to my understanding, is that the WildcardQuery value property should contain the provided search query.

Steps to reproduce:

  1. Create any wildcard query
  2. Serialize request to MemoryStream
  3. Create a search request using client.RequestResponseSerializer.Deserialize
  4. Inspect the SearchRequest.Query.Filter.Value
  5. The value of the filter here is null
    image

Please see working example of issue https://github.com/Leandore/ElasticSearch8/blob/deserialize-issue-investigation/ESClientExample/Program.cs#L61

Expected behavior
When providing a wildcard filter query, the value of the search query should be set according to the input.

Please see helper method to demonstrate missing value
https://github.com/Leandore/ElasticSearch8/blob/deserialize-issue-investigation/ESClientExample/Program.cs#L26-L37

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