I am trying to figure out how to sort one field based on the values of other fields in the index. My final objective is Suppose we have two fields in our objects: ex "val" and "user". Both are not unique. I wanted to take average of val for each unique user and sort them out. ex. user: 23, val : 1 user: 24, val: 4 user: 23, val: 8 In output: 1.)user 23 ------ 4.5 (Average) 2.)user 24 ------ 4 (Average)
The following can be done in kibana using metric table. It might be possible by aggregation but am not able to make sense out of the documentation.
Thanks