zrange
Retrieve sorted set members within a specified index range, including scores if needed.
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 |
|---|---|---|---|
| key | Yes | ||
| start | Yes | ||
| end | Yes | ||
| with_scores | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |