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.
Map function is like this:
"language" => "javascript",
"source" => "function(value,keyData,arg){
return []
},
"keep"=>true