Getting random objects filtered by a set of criteria
seancribbs at gmail.com
Sat Jan 9 11:10:31 EST 2010
If your bucket is small-to-medium, I would list keys in the bucket and
select a random key from that list. You'd likely want to cache that
list if it gets very big, or move on to a custom M/R job if the bucket
gets even larger.
On 1/9/10 11:01 AM, Dmitrii Dimandt wrote:
> I want to show the user a photo to vote for. This has to be a random photo from those he hasn't voted for yet.
> In a prior conversation Kevin Smith suggested I use M/R for such a task. Well, not only do I have to understand how to write such a M/R :) I also need to know whether it's ok to run such a query on every page request.
>  http://twitter.com/kevsmith/status/7557173117 , http://twitter.com/kevsmith/status/7557206025
> riak-users mailing list
> riak-users at lists.basho.com
More information about the riak-users