Posts

Showing posts with the label aerospike

Aerospike: Read records from a particular node using secondary index

Image
Clash Royale CLAN TAG #URR8PPP Aerospike: Read records from a particular node using secondary index I want to read records from Aerospike DB using Secondary index. Could you please if its possible to read records using secondary index from a particular node ( rather than from all nodes --- Default Behavior ) I am looking to do this operation in Java. Could you please point appropriate document or source code for the same. 1 Answer 1 Aerospike distributes all your records evenly across all nodes of your cluster. Lets say you have a 3 node cluster with 6 records as below and possible distribution by nodes shown for argument: id - age - name (On node) 1 - 30 - Jack ( on n1) 2 - 34 - Jill (on n3) 3 - 31 - Bill (on n1) 4 - 29 - Jane (on n2) 5 - 40 - Tim (on n3) 6 - 20 - Nik (on n2) and you build a secondary index on age - and ask for all records where age between 28 and 32 -- the secondary ind...