I'm trying to find the best solution to implement a leaderboard with Elasticsearch.
I store the following data in elastic: playerId, challengeId and score.
Now I want to add "position" column (based on score) but cannot find which is the most efficient way to do this in elastic.
Use case: when I get "all players by challengeId" I want to have "position" field in a response whose value is based on "score" value.
At first look documentation provides many ways to do this: aggregation, Evaluation API, feature datatype and features datatype.
Did anybody use any of these things in elastic? Can I choose one of them for ranking players in leaderboard?
Thanks in advance.