Skip to content

Skip over doc_count_error_upper_bound when deserializing aggregations #1024

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

Closed
wants to merge 1 commit into from
Closed

Conversation

tjrobinson
Copy link

Deserializing a search response with bucket aggregations in it fails because the doc_count_error_upper_bound is unexpected. Take this response snippet for example:

... "aggregations":{"myBucket":{"doc_count_error_upper_bound":105322,"buckets":[{"key":"00000000-1111-1111-0000-070000000000","doc_count":202391...

This commit skips over this value and lets the method continue as intended. This has been tested on elasticsearch 1.4.0.beta1.

Without this change I'm unable to use bucket aggregations.

@gmarz
Copy link
Contributor

gmarz commented Oct 28, 2014

Hey @tjrobinson,

Thank you very much for this PR and pointing this out!

There are actually quite a few changes in 1.4 Beta1 that are not compatible with NEST at the moment, this of course being one of them. We are in the process of going through these changes and making sure 1.4 will be fully compatible with NEST (without breaking compatibility with earlier versions).

That said, I don't think we can simply skip over this property as it's a valid part of the terms aggregation response and should be included. Working on a solution now for this as well as fixing the other aggregations that no longer work in 1.4. Stay tuned.

@gmarz
Copy link
Contributor

gmarz commented Oct 28, 2014

@tjrobinson Just pushed a3dcb39 which fixes the issue while supporting the new response. Thanks again for bringing this to our attention!

@tjrobinson
Copy link
Author

@gmarz Great, thanks.

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