Skip to content

MultisearchBody does not support being written to JSON #8106

Closed
@insulationman

Description

@insulationman

Elastic.Clients.Elasticsearch version:
8.13

Elasticsearch version:

.NET runtime version:
8.0

Operating system version:

Description of the problem including expected versus actual behavior:
The client throws an error when trying to execute a MultiSearch request with the following error message:
Elastic.Transport.UnexpectedTransportException: 'MultisearchBody' is a readonly type, used only on responses and does not support being written to JSON.

Steps to reproduce:

  1. Instantiate a MultiSearchRequest
  2. Instantiate a SearchRequestItem with valid parameters for MultiSearchHeader and MultiSearchBody.
  3. Append the SearchRequestItem to the Searches property of the request.
  4. Using the request as the input parameter, start a MultiSearch using client.MultiSearchAsync

Expected behavior
The client should perform a multisearch after the Request is Serialized.

Provide ConnectionSettings (if relevant):

Provide DebugInformation (if relevant):

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