http://groups.google.com/group/redis-db/browse_thread/thread/f17f696761088655?fwc=2
will be added in redis 2.2 or not?
Also,
1) why there are no zunion as sunion, but only zunionstore command?
2) is it possible, if for some reason zdiff is not feasible, add a command like
Z2S zset set
to get a set from a zset, and do it fast :D
BR
Shannon
I've not heard anything, but now is a good time to get the discussion going :)
> Also,
>
> 1) why there are no zunion as sunion, but only zunionstore command?
With a set, there is no real way to pull down partial blocks of data
without a SORT. Zsets allow you to pull individual items, ranges,
etc. Also, because of transactional pipelines with MULTI/EXEC, the
non-store versions are effectively redundant with regards to commands
(a store can be followed by a delete, making it equivalent to the
non-store version).
> 2) is it possible, if for some reason zdiff is not feasible, add a command like
>
> Z2S zset set
>
> to get a set from a zset, and do it fast :D
Zdiff is possible, I imagine it was lost in the shuffle of all of the
other things to do for the 2.0 release that were more important at the
time. It would be interesting to be able to quickly be able to
convert a zset into a set, as the reverse is already possible with
ZUNIONSTORE/ZINTERSTORE.
Regards,
- Josiah
R.
Shannon
2010/10/21 Josiah Carlson <josiah....@gmail.com>:
> --
> 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.
>
>
- Josiah
Why there is no use case? For example, what I am trying to do now:
A bbs has posts, which I plan to put in a zset, because they have time
lines. No there is a set (or zset) recording the post id a user has
already read. I would like to use DIFF to extract all new posts for a
user.
In fact if possible I would suggest to allow diff/union/intersect to
accept hybrid data types, e.g. a set diff a zset etc. But then again,
I don't know how redis works, so this may be impossible.
But I do think there are many valid use cases...
Regards,
Shannon
2010/10/21 George Bashi <ja...@georgebashi.com>: