// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.zrevrangebylex('key', '-', '(g', function (err, members) {
  // callback called once the action has completed

// Using promises (NodeJS only)
kuzzle.memoryStorage.zrevrangebylexPromise('key', '-', '(g')
  .then(members => {
    // resolved once the action has completed
kuzzle.memoryStorage.zrevrangebylex("key", "-", "(g", new ResponseListener<String[]>() {
  public void onSuccess(String[] members) {
    // callback called once the action has completed

  public void onError(JSONObject error) {

use \Kuzzle\Kuzzle;

$kuzzle = new Kuzzle('localhost');

try {
  $members = $kuzzle->memoryStorage()->zrevrangebylex('key', '-', '(g');
catch (ErrorException $e) {


Callback response:


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

[Redis documentation]

zrevrangebylex(key, min, max, [options], [callback])

keystringKey identifier
minstringMinimum member value (inclusive by default)
maxstringMaximum member value (inclusive by default)
optionsJSON ObjectOptional parameters


limitarrayLimit the result set to a range of matching elements (similar to SELECT LIMIT offset, count in SQL).
Format: [<offset(int)>, <count(int)>]
queuablebooleanMark this request as (not) queuabletrue

Return value

Returns the MemoryStorage object to allow chaining.

Callback response

Resolves to an array of matching members.