Created
November 17, 2010 02:58
-
-
Save radamant/702914 to your computer and use it in GitHub Desktop.
a-ha!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| redis> lrange test-index-list 0 -1 | |
| 1. "4" | |
| 2. "3" | |
| 3. "2" | |
| 4. "1" | |
| redis> set test-index-index:4 100 | |
| OK | |
| redis> set test-index-index:4 100 | |
| OK | |
| redis> set test-index-index:3 500 | |
| OK | |
| redis> set test-index-index:2 200 | |
| OK | |
| redis> set test-index-index:1 2000 | |
| OK | |
| redis> sort test-index-list by test-index-index:* | |
| 1. "4" | |
| 2. "2" | |
| 3. "3" | |
| 4. "1" | |
| redis> sort test-index-list by test-index-index:* get test-index-data:*->name | |
| 1. "hal" | |
| 2. "fanny" | |
| 3. "zelda" | |
| 4. "bob" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment