Skip to content

ZRANK ability to return "unique" rank #943

@antirez

Description

@antirez

There are applications where it is useful to get the rank without counting all the duplicated entries with the same score, for instance in a game leader board if I've the best score, even if there are other three with the same score, I'm supposed to be the first.

The feature was already implemented here:

https://github.com/Sylvain-Royer/redis/tree/unique_ties

It was also discussed in the mailing list. The new function is quite useful and the code not too complex, so I'll re-evaluate it at some time in the future as the code gets more tested.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions