Thanks for your help. Your query returned the same number over and over
again just as expected.
I think I have found the reason for my problem though. The client lib
CorrugatedIron seems to wrap each document in the MapReduce result into a
array turning the result into a nested array looking like:
[[{doc1}], [{doc2}], [{doc3}]] counting 3 arrays & 3 docs
and sometimes
[[{doc1}], [{doc2}, {doc3}]] counting 2 arrays and 2 docs (according to my
client code... :)
Why the result for same query in CorrugatedIron and for a simple curl
differs I don't know but I will investigate it further.
Thanks again for your help!
Best regards,
Mattias
2013/4/16 Christian Dahlqvist <[email protected]>
> Hi Mattias,
>
> The following curl query simply counts the number of inputs, and has
> worked well for me in the past. Can you please run it against the cluster a
> couple of times and see if it also return varying number of results?
>
> curl -XPOST http://localhost:8098/mapred
> -H 'Content-Type: application/json'
> -d '{"inputs":{
> "bucket":"som-bucket",
> "index":"userid_bin",
> "key":"18481123123"
> },
> "query":[{"reduce":{"language":"erlang",
> "module":"riak_kv_mapreduce",
> "function":"reduce_count_inputs"
> }}]}'
>
> Best regards,
>
> Christian
>
>
>
>
>
> On 16 Apr 2013, at 15:52, Mattias Sjölinder <[email protected]> wrote:
>
> 18481123123
>
>
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com