Hi Simon,

Just realized your question was specific to the Java client. I don't see a
way to provide the "arg" property in the Java client. I've filed a bug for
this issue:
http://issues.basho.com/show_bug.cgi?id=257

Thanks,
Dan

Daniel Reverri
Developer Advocate
Basho Technologies, Inc.
[email protected]


On Mon, Jun 14, 2010 at 7:05 PM, Dan Reverri <[email protected]> wrote:

> Hi Simon,
>
> Static arguments can be passed to MapReduce queries using the "arg"
> property. Here is an example query that runs over all the keys in the bucket
> "bucket":
> {
>     "inputs": "bucket",
>     "query": [
>         {
>             "map": {
>                 "language": "javascript",
>                 "source": "function(value, keyData, arg) { return [arg];
> }",
>                 "keep": true,
>                 "arg": "static data"
>             }
>         }
>     ]
> }
>
>
>
> Daniel Reverri
> Developer Advocate
> Basho Technologies, Inc.
> [email protected]
>
>
>
> On Mon, Jun 14, 2010 at 6:42 PM, Simon Cusack <[email protected]>wrote:
>
>> Hi all,
>>
>> I hope this is the right place to ask this.
>>
>> I have been playing with the riak-java-client via clojure which has
>> been great.
>>
>> However I cant find a way to pass static args using MapReduceBuilder.
>> My javascript map function is like this;
>>
>> function(value, keyData, arg){
>>  if (some_predicate(value, arg)){
>>    return munged(value);
>>  }
>>  return [];
>> }
>>
>> I am trying to workout how to pass the "arg".
>>
>> Any pointers would be greatly appreciated.
>>
>> regards, Simon Cusack.
>>
>> _______________________________________________
>> riak-users mailing list
>> [email protected]
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to