zrange
Retrieve a specific range of members from a Redis sorted set by specifying start and end indices, optionally including scores for precise data handling.
Instructions
Retrieve a range of members from a Redis sorted set.
Args: key (str): The sorted set key. start (int): The starting index. end (int): The ending index. with_scores (bool, optional): Whether to include scores in the result.
Returns: str: The sorted set members in the given range or an error message.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
end | Yes | ||
key | Yes | ||
start | Yes | ||
with_scores | No |
Input Schema (JSON Schema)
{
"properties": {
"end": {
"title": "End",
"type": "integer"
},
"key": {
"title": "Key",
"type": "string"
},
"start": {
"title": "Start",
"type": "integer"
},
"with_scores": {
"default": false,
"title": "With Scores",
"type": "boolean"
}
},
"required": [
"key",
"start",
"end"
],
"title": "zrangeArguments",
"type": "object"
}