
- Redis Basics
- Redis - Home
- Redis - Overview
- Redis - Environment
- Redis - Configuration
- Redis - Data types
- Redis Commands
- Redis - Commands
- Redis - Keys
- Redis - Strings
- Redis - Hashes
- Redis - Lists
- Redis - Sets
- Redis - Sorted Sets
- Redis - HyperLogLog
- Redis - Publish Subscribe
- Redis - Transactions
- Redis - Scripting
- Redis - Connections
- Redis - Server
- Redis Advanced
- Redis - Backup
- Redis - Security
- Redis - Benchmarks
- Redis - Client Connection
- Redis - Pipelining
- Redis - Partitioning
- Redis - Java
- Redis - Php
- Redis Useful Resources
- Redis - Quick Guide
- Redis - Useful Resources
- Redis - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Redis - Sorted Set Zrevrangebyscore Command
Redis ZREVRANGEBYSCORE command returns all the elements in the sorted set at the key with a score between max and min (including elements with score equal to max or min). In contrary to the default ordering of sorted sets, for this command the elements are considered to be ordered from high to low scores. The elements having the same score are returned in a reverse lexicographical order
Return Value
Array reply, list of elements in the specified score range (optionally with their scores).
Syntax
Following is the basic syntax of Redis ZREVRANGEBYSCORE command.
redis 127.0.0.1:6379> ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count]
Example
redis 127.0.0.1:6379> ZADD myzset 1 b 2 c 3 d 4 e (integer) 4 redis 127.0.0.1:6379> ZREVRANGEBYSCORE myzset +inf -inf 1) "e" 2) "d" 3) "c" 4) "b" redis 127.0.0.1:6379> ZREVRANGEBYSCORE myzset 2 1 1) "c" 2) "b"
redis_sorted_sets.htm
Advertisements