Cannot set index headers to object via erlang client

Dimitry D legato.di at gmail.com
Fri Aug 12 14:22:18 EDT 2011


I've pushed last version from github, set backend to index and tried this
code:


Obj =
riakc_obj:new(<<"test">>, <<"1.1">>, <<"1312.23">>, <<"application/json">>),
Obj1 =
riakc_obj:update_metadata(Obj, dict:store(<<"x-riak-index-amount_bin">>,
<<"1312.23">>, dict:new())),
{ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8081),
Result = riakc_pb_socket:put(Pid, Obj1, [{w, 1}, return_head]),
error_logger:info_msg("Result ~p~n",[Result]).


And nothing happens, just content-type switched to octet-stream.  Header
field has not been added and object has been stored without it.

1) Is this means that secondary index feature doesn't work with erlang
client yet?
2) By the way, in some docs they say that in riakc_pb_socket:put in options
it is possible to set r parameter, but it is not true.


Thank you for attention.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110812/066f0bb4/attachment.html>


More information about the riak-users mailing list