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

// Using promises (NodeJS only)
kuzzle.memoryStorage.zrangebylexPromise('key', '-', '(g')
  .then(members => {
    // resolved once the action has completed
kuzzle.memoryStorage.zrangebylex("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()->zrangebylex('key', '-', '(g');
catch (ErrorException $e) {


Callback response:


Returns elements in a sorted set where all members have equal score, using lexicographical ordering. The min and max values are inclusive by default. To change this behavior, please check the full documentation.

[Redis documentation]

zrangebylex(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.