Thanks, a few questions inline...
On Fri, Nov 19, 2010 at 2:43 PM, Sean Cribbs <[email protected]> wrote:
class Riak::Alternative
> include Ripple::Document
> many :visitors, :class_name => "Riak::Visitor"
> property :alternative_id, Integer, :presence => true
> key_on :alternative_id
> end
>
If I expect to be writing large numbers of visitor->alternatives links is it
performant to be writing them all as links on one object, as opposed to
creating many experience docs each with a link ? Naïvely I would assume
this might less evenly distribute write load or degrade as the size of the
Link data grows. Does this matter?
> ########
>
> def visitors_who_shared
> Riak::MapReduce.new(Ripple.client).
> add("riak_alternatives", ar_id.to_s).
> link(:bucket => 'riak_visitors').
> map(link_to_events_forward_visitor).
> map(map_share_events_to_visitor).
> reduce(["riak_kv_mapreduce", "reduce_set_union"]).
> map(map_identity, :keep => true).
> run
> end
>
Ah, I was looking for a set_union. Is there a full list of these functions
hiding somewhere?
Thanks,
pt.
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com