Any plan for ZUNION and ZWEIGHTUNION?

6 views
Skip to first unread message

Alex Dong

unread,
Jan 28, 2010, 7:03:43 PM1/28/10
to Redis DB
Hi Folks,

Wondering are there any plan for a sorted sets union? Or even better,
a weighted sorted sets union?

Here is the scenario. Let's say we have a sorted set for each
blogger's tags, weighted by number of occurrence. A sorted sets union
will quickly tell what are the top 10 tags people A,B,C use? Even
better, if user A is ranked as level 3 whereas B,C level 1, a
weighted union will return better results.

Proposed grammar:
- ZUNION key set-1 set-2 ... set-N
- ZWEIGHTUNION key set-1 weight-1 set-2 weight-2 ... set-N weight-N

In this thread: "SORTSTORE command proposal"
http://groups.google.com/group/redis-db/browse_thread/thread/bbb8c9eddff85cd4/5c302e0e380f9621?lnk=gst&q=union#5c302e0e380f9621
@antirez mentioned that "Instead with sorted sets, there are
algorithms to make this much more faster. ", so any plan for adding
this? If I'd like to add this feature, where shall I start? Are
there any coding guide docs I can explore?

Cheers,
Alex

Aníbal Rojas

unread,
Jan 29, 2010, 8:55:21 AM1/29/10
to redi...@googlegroups.com
Alex,

This commands have been discussed in the list, and are in the plans
of Salvatore. Not sure if they are formally in the roadmap.

--
Aníbal Rojas
Ruby on Rails Web Developer
http://www.google.com/profiles/anibalrojas

> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>

Alex Dong

unread,
Jan 29, 2010, 5:29:34 PM1/29/10
to redi...@googlegroups.com
If I'd like to add this feature, where shall I start? Are
there any coding guide docs I can explore?
Sure. Any pointer on where I should go to add these features in? 

Alex


Aníbal Rojas

unread,
Jan 31, 2010, 8:12:29 AM1/31/10
to redi...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages