# Leaderboard with player ranking. Calculating player position

**URL:** <https://discuss.elastic.co/t/leaderboard-with-player-ranking-calculating-player-position/221725>\
**Category:** Elasticsearch\
**Created:** [March 2, 2020, 4:15pm UTC](https://discuss.elastic.co/t/leaderboard-with-player-ranking-calculating-player-position/221725 "2020-03-02T16:15:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sblon](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@sblon](https://discuss.elastic.co/u/sblon)\
**Post date:** [March 2, 2020, 4:15pm UTC](https://discuss.elastic.co/t/leaderboard-with-player-ranking-calculating-player-position/221725/1 "2020-03-02T16:15:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 30, 2020, 4:15pm UTC](https://discuss.elastic.co/t/leaderboard-with-player-ranking-calculating-player-position/221725/2 "2020-03-30T16:15:32Z")

</div>

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