Cannot set index headers to object via erlang client

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

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

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("", 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: <>

More information about the riak-users mailing list