hackpar / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[FEATURE REQUEST] ability to store part of a sorted set to a set #440

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
For example, I have a list of items, some sets to record item tags, and a 
sorted set to record item update time in its score. When I want to generate a 
list of items updated within an hour and with a special tag(the list does not 
have to order by updated time), I could do:

zset2setbyscore zset:item:update set:item:updated:hour now() now()-3600
sinterstore set:item:updated:hour:tag set:item:updated:hour set:item:tag
sort set:item:updated:hour:tag by ...

Original issue reported on code.google.com by ZhangGon...@gmail.com on 22 Jan 2011 at 7:29