Core
API v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

zrank #

Returns the position of an element in a sorted set, with scores sorted in ascending order. The index returned is 0-based (the lowest score member has an index of 0).

[Redis documentation]


Query Syntax #

HTTP #

URL: http://kuzzle:7512/ms/_zrank/<_id>/<member>
Method: GET

Other protocols #

{
  "controller": "ms",
  "action": "zrank",
  "_id": "<key>",
  "member": "<member>"
}

Arguments #

  • _id: sorted set identifier
  • member: member value to search

Response #

Returns the index of the found member in the sorted set, or null if the member is not found.

{
  "requestId": "<unique request identifier>",
  "status": 200,
  "error": null,
  "controller": "ms",
  "action": "zrank",
  "collection": null,
  "index": null,
  "result": 12
}