You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the problem including expected versus actual behavior:
When attempting to build a QueryString that contains just 1 field in the Fields array list the deserialization generates an invalid search body into elastic. This is a new problem with the 8.12 release and was working as expected in the 8.11 release.
Code like:
new QueryStringQuery()
{
Query = "test",
Fields = new List<string> {"field1"}.ToArray()
}
Notice that the fields member is a string value rather than an array. This fails on the elastic search cluster. When building with multiple field values the string is generated properly:
new QueryStringQuery()
{
Query = "test",
Fields = new List<string> {"field1", "field2"}.ToArray()
}
Elastic.Clients.Elasticsearch version: 8.12.0
Elasticsearch version: 8.8.1
.NET runtime version: 8.0.2
Operating system version: OSX
Description of the problem including expected versus actual behavior:
When attempting to build a QueryString that contains just 1 field in the Fields array list the deserialization generates an invalid search body into elastic. This is a new problem with the 8.12 release and was working as expected in the 8.11 release.
Code like:
The body going into elastic will look like:
Notice that the fields member is a string value rather than an array. This fails on the elastic search cluster. When building with multiple field values the string is generated properly:
The body going into elastic will look like:
And this generates valid code for the elastic cluster.
Expected behavior
Build out the fields as an array regardless of how many items are in the fields array as it was doing in the 8.11 release.
The text was updated successfully, but these errors were encountered: