Key filters + link walking

Dan Reverri dan at basho.com
Mon Mar 14 20:13:37 EDT 2011


Hi Jason,

I've filed bug 1043 for this issue:
https://issues.basho.com/show_bug.cgi?id=1043

Thanks,
Dan

Daniel Reverri
Developer Advocate
Basho Technologies, Inc.
dan at basho.com


On Mon, Mar 14, 2011 at 1:40 PM, Jason J. W. Williams <
jasonjwwilliams at gmail.com> wrote:

> On Mon, Mar 14, 2011 at 2:01 PM, Dan Reverri <dan at 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.
>> dan at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110314/e4cff05d/attachment.html>


More information about the riak-users mailing list