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.

zrevrangebylex #

Identical to zrangebylex except that the sorted set is traversed in descending order.

[Redis documentation]


Query Syntax #

HTTP #

URL: http://kuzzle:7512/ms/_zrevrangebylex/<_id>?min=<min interval>&max=<max interval>[&limit=offset,count]
Method: GET

Other protocols #

{
  "controller": "ms",
  "action": "zrevrangebylex",
  "_id": "<key>",
  "min": "<min interval>",
  "max": "<max interval>",

  "limit": ["<offset>", "<count>"]
}

Arguments #

  • _id: sorted set identifier
  • min: minimum element value
  • max: maximum element value

The min and max values are inclusive by default. To change this behavior, check the full Redis documentation.

Optional: #

  • limit: an array of 2 integers, used to limit the number of returned matching elements (similar to SELECT LIMIT offset, count in SQL). Format: [<offset>,<count>]

Response #

Returns an array of matched elements.

{
  "requestId": "<unique request identifier>",
  "status": 200,
  "error": null,
  "controller": "ms",
  "action": "zrevrangebylex",
  "collection": null,
  "index": null,
  "result": [
    "...",
    "element2",
    "element1"
  ]
}