Question about counters

Alexander Sicular siculars at gmail.com
Sun Jun 29 18:14:25 EDT 2014


Not that I know of. I believe keys are independent in this regard. Basho is introducing sets in riak 2.0 but I don't think they will bee sorted sets like in redis. 

-Alexander 

@siculars
http://siculars.posthaven.com

Sent from my iRotaryPhone

> On Jun 29, 2014, at 15:54, Alex De la rosa <alex.rosa.box at gmail.com> wrote:
> 
> Hi there,
> 
> I have a question about something that just came up to my mind... can we determine which counter is higher in a bucket? For example:
> 
> # Taking the FIFA World Cup as example:
> 
> bucket = client.bucket_type('counter_bucket').bucket('goals')
> counter = bucket.new('Neymar')
> counter.increment(4)
> counter = bucket.new('Messi')
> counter.increment(4)
> counter = bucket.new('JamesRodriguez')
> counter.increment(5)
> 
> Is there any way (without using MapReduce) to get the top scorer of the World Cup? or a descendent ordered list of the keys by its value?
> 
> Cheers,
> Alex
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140629/0c60b4b5/attachment.html>


More information about the riak-users mailing list