Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Promote longs to doubles when merging terms agg results that contain both longs and doubles #22232
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.