Leaderboard with player ranking. Calculating player position

Im trying to find the best solution to implement leaderboard by Elasticsearch.

I store the next date in elastic: playerId, challengeId and score.

Now I wanna add "position" column (based on score) but could not find the more efficient way for this in elastic.

Use case: when I get "all players by challengeId" I wanna have "position" field in a response which value is based on "score" value.

At first look documentation provides many ways to do this: aggregation, Evaluation API, feature datatype and features datatype.

Who used any of these things in elastic? Can I choose one of them for ranking players in leaderboard?

Thanks in advance.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.