This is because the internal representation (record named riak_object) in Riak is not identical to the external representation (record named riakc_obj) in the client. Naturally, the functions in riakc_obj won't work on the internal record of a different name. There's also no way to convert a riak_object record directly to a riakc_obj record currently. However, if you're already using internal modules to riak_kv (as is indicated in your sample), simply use the riak_object module on those results.
Alternatively, you can use the riakc_pb_socket:get_index/* functions to retrieve just the keys and then fetch the bucket/key pairs using the get/* path. On Sat, Mar 3, 2012 at 4:16 AM, Senthilkumar Peelikkampatti < senthilkumar.peelikkampa...@gmail.com> wrote: > riak-erlang-client mapred with riak_kv_mapreduce:map_identity(true) is > returning riak_object instead of riakc_obj -- I tried multiple times and I > am not seeing riakc_obj. > > IndexSpec = {index, bucket(), <<"some_bin">>, Bin} > > riakc_pb_socket:mapred(Pid, IndexSpec, > [riak_kv_mapreduce:map_identity(true)]) > > > Note: It is very late night [03:10 AM CST] and I am fiddling with native > and riak pb client's so I may be wrong. However I crosschecked again and it > is still returning riak_object but not riakc_obj. > > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > > -- Sean Cribbs <s...@basho.com> Software Engineer Basho Technologies, Inc. http://basho.com/
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com