Display same rank when score is the same

Another community member also highlighted that there are many users with similar scores and they are still ranked in order.

How about displaying the same rank number when the score is the same? So for the above example, those users would all be ranked at 48.

(note for context we’ve renamed “Cheers” to “Contributions”)

7 Likes

I visited the leaderboard here on meta and it said in the blue box that my rank is 30. But in fact it is 32. There are two cases of ties in scores higher than mine and I speculate that’s the cause.

Those people are shown in the ranking at different ranks which is a second bug.

If the scores were 100, 90, 90, 70 then the corresponding people should conventionally be ranked 1st, equal 2nd, equal 2nd, 4th.

(First time I’ve even looked at the board, honest!)

4 Likes

I’ve slipped your post over to here @Ed_S to keep the reports grouped together. :+1:

5 Likes

Thanks - there are I think two bugs.

2 Likes

Looks like users with the same number of cheers are now ranked equally

1 Like

Yes, this behaviour is configurable via the score ranking strategy setting:

  • dense_rank (default) - Produces the tie behaviour shown in your screenshot
  • rank - Tied rows get the same rank, next rank is incremented by number of tied rows
  • row_number - Produces the tie behaviour shown in the original post
3 Likes

Indeed! Seems like the setting was added by you shortly after the last post here in PERF: Precompute leaderboards using materialized views (#112) · discourse/discourse-gamification@2eadff6 · GitHub.

So I guess this is completed and can be closed.

4 Likes