My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
ZunionstoreCommand  
Updated Dec 21, 2010 by anti...@gmail.com

We moved to Redis.io!

Redis home moved to http://redis.io, please visit our new home.

Comment by neuro.potent, Jun 29, 2010

ZINTERBYSCORE seems like a good addition to me :)

This will enable ZSETs to be used as a multi-dimensional data set, where you could use 2 ZSET to store 2 weights for every item, then when you need to find them using 2 ranges, just do a ZINTERBYSCORE (or ZINTERSTOREBYSCORE) from both sets and specifying the min and max score for each set.

For example, I could store geographical data by using two ZSET for each point. One for latitudes and another for longitudes. Then when I want to display them on a map, I can do a ZINTERBYSCORE from the latitude set and longitude set supplying the min/max of each respectively to get the results inside the bounds I want.

It'd be useful for operations which requires sorting by multiple axes.

I know this might be better done on the client side, but since you already have ZINTERSTORE....

Comment by cyx.uc...@gmail.com, Jul 12, 2010

Will there ever be a zdiffstore? Please please?

Comment by george.s...@gmail.com, Jul 20, 2010

Wish there was a combination of this and ZRANGE/ZREVRANGE so that you could compute, say, the union/intersection of the first 50 items of set1 with the last 30 items of set2, etc.

Comment by vita...@gmail.com, Nov 7, 2010

+1 to implement ZDIFFSTORE in main branch

Comment by zimpenf...@gmail.com, Nov 26, 2010

+1 also for ZDIFF or ZDIFF store.


Sign in to add a comment
Powered by Google Project Hosting