map/reduce phases

francisco treacy francisco.treacy at gmail.com
Sun Feb 7 17:17:53 EST 2010


I am able to get a sensible result out of this query:

{"inputs": [["test", "jsondoc"]],
  "query":[
 {"map":{"language":"javascript","source":"function(v){ return [v]; }"}}
 ]}

(just applying an identity function), however when I add a previous
phase to map to my objects via Riak.mapValuesJson, like:

{"inputs": [["test", "jsondoc"]],
  "query":[ {"map":{"language":"javascript", "name":"Riak.mapValuesJson"}},
 {"map":{"language":"javascript","source":"function(v){ return [v]; }"}}
 ]}

...I always get back the value [].

If I *only* apply Riak.mapValuesJson, it works as advertised. Problem
is with both... What could I be doing wrong?

Thanks!

Francisco




More information about the riak-users mailing list