Skip to content
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

Promote longs to doubles when merging terms agg results that contain both longs and doubles #22232

Closed
jpountz opened this issue Dec 16, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@jpountz
Copy link
Contributor

commented Dec 16, 2016

This won't be perfect as doubles cannot represent all long values, so this might cause a precision loss on large longs which should be documented. But I think this would be a better user-experience than today since we fail such aggregations entirely.

As a next step, we should make the field stats API still consider that fields are aggregatable if some indices map the field as a long and others as a double.

@epixa

This comment has been minimized.

Copy link
Member

commented Dec 16, 2016

Linking this up with the corresponding Kibana issue: elastic/kibana#9430

jimczi added a commit that referenced this issue Jan 10, 2017

Promote longs to doubles when a terms agg mixes decimal and non-decim…
…al numbers (#22449)

* Promote longs to doubles when a terms agg mixes decimal and non-decimal number

This change makes the terms aggregation work when the buckets coming from different indices are a mix of decimal numbers and non-decimal numbers. In this case non-decimal number (longs) are promoted to decimal (double) which can result in a loss of precision for big numbers.

Fixes #22232

@nik9000 nik9000 removed this from Search & Aggs in Background tasks Feb 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.