code | type | title |
---|---|---|
true |
page |
zrangebylex | API | Core |
Returns elements within a provided interval, in a sorted set where all members have equal score, using lexicographical ordering.
URL: http://kuzzle:7512/ms/_zrangebylex/<_id>?min=<min interval>&max=<max interval>[&limit=offset,count]
Method: GET
{
"controller": "ms",
"action": "zrangebylex",
"_id": "<key>",
"min": "<min interval>",
"max": "<max interval>",
// optional
"limit": [<offset>, <count>]
}
_id
: sorted set identifiermin
: minimum element valuemax
: maximum element value
The min
and max
values are inclusive by default. To change this behavior, check the full Redis documentation.
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>]
Returns an array of matched elements.
{
"requestId": "<unique request identifier>",
"status": 200,
"error": null,
"controller": "ms",
"action": "zrangebylex",
"collection": null,
"index": null,
"result": [
"element1",
"element2",
"..."
]
}