On Mon, Mar 14, 2011 at 2:01 PM, Dan Reverri <d...@basho.com> wrote: > Hi Jason, > > The reduce_identity function expects a two element tuple or a two element > list; you can see this by looking at the pattern matching in the function: > https://github.com/basho/riak_kv/blob/master/src/riak_kv_mapreduce.erl#L141 > > A link phase returns a three element list (["bucket", "key", "tag"]). The > reduce_identity function should probably be updated to handle the output of > a phase. In the mean time you can use the reduce_set_union function instead: > { > "inputs":{ > "bucket":"bucket", > "key_filters":[["neq", "foo"]] > }, > "query":[ > {"link":{}}, > {"reduce":{"language":"erlang","module":"riak_kv_mapreduce", > "function":"reduce_set_union"}} > ] > } > > Thanks, > Dan > > Daniel Reverri > Developer Advocate > Basho Technologies, Inc. > d...@basho.com > > Hi Dan,
Thank you. That helps a lot. Trying to use the built-in Erlang reduce functions for txRiakIdx until the bug with Key Filters + JS reduce phase get fixed. -J
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com