Skip to content

Instantly share code, notes, and snippets.

@kellymclaughlin
Created November 9, 2012 05:16
Show Gist options
  • Save kellymclaughlin/4043845 to your computer and use it in GitHub Desktop.
Save kellymclaughlin/4043845 to your computer and use it in GitHub Desktop.
riakc PUT with 2I
Indexes = [{<<"index1_bin">>, <<"val">>},
{<<"index2_int">>, 1}],
Meta = dict:store(<<"index">>, Indexes, dict:new()),
Obj = riakc_obj:new(<<"mybucket">>, <<"mykey">>, <<"myval">>),
Obj1 = riakc_obj:update_metadata(Obj, Meta),
riakc_pb_socket:put(RiakPid, Obj1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment