Lets say I have data like this. Every unique "key" has a unique "long key" - totally 1 to 1.
Because key is numeric will prefer using it for agrregating (using) using terms-> field.
Field "somedata" is subject to aggregations like sum etc when grouped by the key.
When aggregating for sum or avg of somedata- would like to also compute long key-
Source Data::
| key | long key | somedata |
| 1 | XYZ | 10 |
| 1 | XYZ | 20 |
| 1 | XYZ | 20 |
| 2 | PQR | 30 |
| 2 | PQR | 35 |
Expected Aggregation representation:
| key | long key | sum of somedata |
| 1 | XYZ | 50 |
| 2 | PQR | 65 |
R