MapReduce: map then inputs

Jimmy Ho jho at jimmyho.com
Thu Apr 4 15:59:00 EDT 2013


Hi guys,

I am sure I've seen it somewhere explaining what I'd like to do but can no
longer find the link, hope someone could help?  Thanks.

I have a 'user' bucket which stores a list of keys within the data,
pointing to other users as friends...

ie
For User "mathew"

data: {
"friends": [ "john", "mark", "luke" ]
}


How would I get the keys of mathew's friends' friends via map reduce?

inputs: [["user", "mathew"]],
query: [ {map:... get a list of [[bucket, friend_key]] }

What is the next phase to read the bucket/key values as the new inputs?

Thanks guys,
Regards, Jimmy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130404/8b9d6647/attachment.html>


More information about the riak-users mailing list