key not found in map reduce

Venki Yedidha venkatesh.yedidha at gmail.com
Mon Oct 1 01:03:47 EDT 2012


Hi Mridul,
       You can use filterNotFound from mapred_builtins.js...
       usage format in reduce phase:
       return  Riak.filterNotFound(your_object_passed _from_map_phase);

Thanks,
Venkatesh



On Sun, Sep 30, 2012 at 2:59 PM, Mridul Kashatria <mridul at readwhere.com>wrote:

> Hi,
>
> I'm a beginner with Riak and map-reduce in general.
>
> I was trying a function in map reduce which sorts the data and returns it.
> It works well when all the bucket key pairs in input query exist in the
> riak cluster. When a bucket/key pair does not exist, it gives an output
> like below.
>
>


>
> [{"not_found":{"bucket":"newspaper-issue","key":"56276","keydata":"undefined"}}]
>
> I'm not able to remove this output from the map phase, even when I just
> return [] in the map phase, it returns this single object.
>
> My question is how can I avoid this output as it is likely that in the
> inputs there is some bucket/key missing.
>
> --
> Mridul
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20121001/ba5c4353/attachment.html>


More information about the riak-users mailing list