I'm trying to retrieve the Primary key in the Aerospike node.js client using client.get(). I have inserted the records using client.put() by changing the policy to Aerospike.policy.key.SEND as mentioned here and here.
Now I want to retrieve the records along with the Primary key. I tried doing it like this as mentioned in the Aerospike Documentation but it doesn't seem to work.
var key = aerospike.key(aerospikeDBParams.defaultNamespace,aerospikeDBParams.defaultSet,count);
var readpolicy = {
key: aerospike.policy.key.SEND
}
client.get(key, readpolicy, function(err, rec, meta){}
I get all the bins but not the Primary key. Am I missing something here?
Thanks in advance.