 <p>I developed a <a href="https://github.com/whitenode/riak_mapreduce_utils" rel="nofollow">set of configurable utility functions for Riak mapreduce</a> in Erlang. As I wanted to be able to specify sets of critera, I decided to allow the user to pass configuration in as a JSON document as this works well for all client types, although other text representations should also work. Examples of how these functions are used from curl are available in the README.markdown file.</p> <p>You can pass an argument to each individual map or reduce phase function through the 'arg' parameter. Whatever you specify here will be passed on as the final parameter to the map or reduce phase, see the example below:</p> <pre><code>"query":[{"map":{"language":"erlang","module":"riak_mapreduce_utils", "function":"map_link","keep":false, "arg":"{\"bucket\":\"master\"}"}}, </code></pre>