Skip to content
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

MultisearchBody does not support being written to JSON #8106

Closed
insulationman opened this issue Apr 9, 2024 · 1 comment · Fixed by #8107
Closed

MultisearchBody does not support being written to JSON #8106

insulationman opened this issue Apr 9, 2024 · 1 comment · Fixed by #8107
Labels
8.x Relates to 8.x client version Area: Generator Category: Bug

Comments

@insulationman
Copy link

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):

@flobernd
Copy link
Member

flobernd commented Apr 9, 2024

Hi @insulationman,

thanks for reporting! This is fixed in 8.13.5.

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

Successfully merging a pull request may close this issue.

2 participants