Cannot set index headers to object via erlang client

Kelly McLaughlin kelly at basho.com
Fri Aug 12 14:31:57 EDT 2011


Dimitry,

The protocol buffers client does not yet support secondary indexes. For the moment you'll have to stick with the HTTP API.

Kelly


On Aug 12, 2011, at 12:22 PM, Dimitry D wrote:

> 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. _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110812/bae3d89a/attachment.html>


More information about the riak-users mailing list