Skip to content

Instantly share code, notes, and snippets.

@binarytemple
Forked from kellymclaughlin/gist:4043845
Last active August 29, 2015 14:03
Show Gist options
  • Save binarytemple/caa4862625eac4253443 to your computer and use it in GitHub Desktop.
Save binarytemple/caa4862625eac4253443 to your computer and use it in GitHub Desktop.
riakc secondary index put

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