Most efficient way to determine if 1000 specific keys exist?

Kelly McLaughlin kelly at
Sat May 5 17:25:29 EDT 2012


Another option along the lines of what Markus described would be to use a HEAD request. This will still cause Riak to read the object, but it has the advantage that the entire object is not returned in the response. You can do this with the HTTP or the PB interface. Making an HTTP HEAD request is pretty straightforward and with the pb interface you would use the 'head' get option. With the erlang pb client it would look something like this: riakc_pb_socket:get(Pid, <<"abucket">>, <<"akey">>, [head]). Not sure if this method works for what you want to do, but just throwing it out there in case. 


More information about the riak-users mailing list