We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Elastic.Clients.Elasticsearch version: 9.0.0
Elasticsearch version: 9.0.0
.NET runtime version: 9.0.4
Operating system version: macOS
Description of the problem including expected versus actual behavior:
Incorrect query serialization for inner_hits.fields. According to spec it can be just string (not an array): https://github.com/elastic/elasticsearch-specification/blob/main/specification/_types/common.ts#L137
inner_hits.fields
but elastic reply with error [inner_hits] fields doesn't support values of type: VALUE_STRING when fields serialized as string instead of arrray.
[inner_hits] fields doesn't support values of type: VALUE_STRING
fields
string
arrray
Steps to reproduce:
Execute query with fields serialized as string
"inner_hits": { "fields": "passages.text", "name": "elser-chunk", "size": 1, "_source": false },
Expected behavior
Server should not return an error in this case, or serializer should always serialize fields as array. Following example work as expected:
"inner_hits": { "fields": ["passages.text"], "name": "elser-chunk", "size": 1, "_source": false },
Provide DebugInformation (if relevant):
DebugInformation
// cc @flobernd please take a look, it looks like a significant regression.
The text was updated successfully, but these errors were encountered:
Hi @sergey-tihon, thanks for reporting. Just to clarify. Did that work in ES (server) 8.x?
It seems that either the specification is incorrect or the server behavior has changed and somebody forgot to update the specification as well.
Sorry, something went wrong.
We did not have this issue before because Elastic.Clients.Elasticsearch 8.17.4 serialized fields as array.
Elastic.Clients.Elasticsearch
8.17.4
I only have access to the cluster with ES (server) 8.18.0 and it behaves in the same way:
8.18.0
array
Thanks for confirming @sergey-tihon, this definitely is a bug in the specification (it should be Field[] instead of Fields).
Field[]
Fields
InnerHits.fields
Successfully merging a pull request may close this issue.
Elastic.Clients.Elasticsearch version: 9.0.0
Elasticsearch version: 9.0.0
.NET runtime version: 9.0.4
Operating system version: macOS
Description of the problem including expected versus actual behavior:
Incorrect query serialization for
inner_hits.fields
.According to spec it can be just string (not an array): https://github.com/elastic/elasticsearch-specification/blob/main/specification/_types/common.ts#L137
but elastic reply with error
[inner_hits] fields doesn't support values of type: VALUE_STRING
whenfields
serialized asstring
instead ofarrray
.Steps to reproduce:
Execute query with
fields
serialized asstring
Expected behavior
Server should not return an error in this case, or serializer should always serialize
fields
as array. Following example work as expected:Provide
DebugInformation
(if relevant):// cc @flobernd please take a look, it looks like a significant regression.
The text was updated successfully, but these errors were encountered: