Skip to content

Fix deserialisation of aggs in Translate response #5228

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

Merged
merged 1 commit into from
Jan 5, 2021

Conversation

stevejgordon
Copy link
Contributor

The Translate API in Elasticsearch returns aggregations using the key "aggregations" rather than "aggs". This results in aggregations not appearing in the SearchRequest instance.

This fix adds a field so that aggregations deserialise correctly using UTF8Json in the DefaultHighLevelSerializer.

I'll open an issue in Elasticsearch to review whether in 8.0, it should prefer "aggs" by default.

Fixes #5201

The Translate API in elasticsearch returns aggregations using the key
"aggregations" rather than "aggs". This results in aggregations not
appearing in the SearchRequest instance.

This fix adds a field so that aggregations deserialise correctly using
UTF8Json.
Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Relates to: elastic/elasticsearch#66994

@stevejgordon stevejgordon merged commit 1500cf4 into 7.11 Jan 5, 2021
@stevejgordon stevejgordon deleted the bug/5201/sql-translate branch January 5, 2021 14:05
github-actions bot pushed a commit that referenced this pull request Jan 5, 2021
The Translate API in elasticsearch returns aggregations using the key
"aggregations" rather than "aggs". This results in aggregations not
appearing in the SearchRequest instance.

This fix adds a field so that aggregations deserialise correctly using
UTF8Json.
github-actions bot pushed a commit that referenced this pull request Jan 5, 2021
The Translate API in elasticsearch returns aggregations using the key
"aggregations" rather than "aggs". This results in aggregations not
appearing in the SearchRequest instance.

This fix adds a field so that aggregations deserialise correctly using
UTF8Json.
stevejgordon added a commit that referenced this pull request Jan 6, 2021
The Translate API in elasticsearch returns aggregations using the key "aggregations" rather than "aggs". This results in aggregations not appearing in the SearchRequest instance.

This fix adds a field so that aggregations deserialise correctly using UTF8Json.

Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
stevejgordon added a commit that referenced this pull request Jan 7, 2021
…5232)

* Fix deserialisation of aggs in Translate response (#5228)

The Translate API in elasticsearch returns aggregations using the key
"aggregations" rather than "aggs". This results in aggregations not
appearing in the SearchRequest instance.

This fix adds a field so that aggregations deserialise correctly using
UTF8Json.

* Fix for master namespaces

Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants