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
What is the bug?
I am using opensearch-java client 2.12.0
Describe the issue:
I have a specific requirement where I will be using aggregations on a index, but I want to use SQL plugin for that. Since the response for the aggregations from OpenSearchClient is very complicated.
I am trying to deserialize the response but getting below error:
Exception in thread "main" jakarta.json.stream.JsonParsingException: Property name 'year' is not in the 'type#name' format. Make sure the request has 'typed_keys' set.
final String body = response.getBody().map(org.opensearch.client.opensearch.generic.Body::bodyAsString).orElse("");
Copying my response from the forum here for posterity:
The aggregation deserialization logic usually relies on passing typed_keys to search requests to be able to unambiguously
deserialize the different types of aggregation, but it looks like the SQL plugin doesn’t support passing that parameter.
@Swiddis@ykmr1224 Is my understanding correct that there's currently no way to pass typed_keys into the SQL/PPL query? If not how feasible is it to be added?
What is the bug?
I am using opensearch-java client 2.12.0
Describe the issue:
I have a specific requirement where I will be using aggregations on a index, but I want to use SQL plugin for that. Since the response for the aggregations from OpenSearchClient is very complicated.
I am trying to deserialize the response but getting below error:
Exception in thread "main" jakarta.json.stream.JsonParsingException: Property name 'year' is not in the 'type#name' format. Make sure the request has 'typed_keys' set.
I get the below response as part of Response body
Below is the code I am trying to deserialize the response
Below is my code for the same
Do you have any additional context?
(https://forum.opensearch.org/t/generic-client-with-custom-deserializer-fails-to-deserialize-aggregations/20739)
The text was updated successfully, but these errors were encountered: