Index query mapreduce error

Ben Kempe ben.kempe at gmail.com
Wed Nov 9 19:26:27 EST 2011


Hi everybody,
We have JSON data in a Riak 1.0/leveldb bucket with an index createdat_int.

http://localhost:8098/buckets/data/index/createdat_int/50000/1320883249

works, but

curl -X POST \
-H "content-type: application/json" \
-d @- \
http://localhost:8098/mapred \
<<EOF
{
  "inputs":{
      "bucket":"data",
      "index":"createdat_int",
      "start":"50000",
      "end":"1320883249"
  },
  "query":[
     {
        "reduce":{
           "language":"erlang",
           "module":"riak_kv_mapreduce",
           "function":"reduce_identity",
           "keep":true
        }
     }
  ]
}
EOF

fails with the following message:

   {throw,
       {invalid_inputdef,
           {index,<<"data">>,<<"createdat_int">>,50000,
               1320883249}},
       [{riak_client,mapred_dynamic_inputs_stream,4},
        {riak_kv_wm_mapred,legacy_mapred,2},
        {webmachine_resource,resource_call,3},
        {webmachine_resource,do,3},
        {webmachine_decision_core,resource_call,1},
        {webmachine_decision_core,decision,1},
        {webmachine_decision_core,handle_request,2},

{webmachine_mochiweb,loop,1}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine
web server</ADDRESS></body></html>

What's the cause for this problem?
I tried to stay close to the examples in the docs.

Thanks, Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111109/6dcdec41/attachment.html>


More information about the riak-users mailing list