Trust what Vikrant is looking for is if you have records such as: Last Name | State | Shoe Size as the 3 bins in the data, and record’s primary key is say some “userid”, Vikrant wants to query a specific lastname+state combination i.e. fetch all Gupta in CA. Building such composite keys out of data in bins is not possible in Aerospike. While the query is possible using Secondary Indexes and Predicate Filtering - this concept of “Composite Key” is not available - no APIs hence. What Albot is suggesting is using the primary key as: “Gupta:CA:userid” to store the record instead of “userid” and then use logic in application to batch read the records that are of interest. In this case, somewhere you will keep a count of total userids for “Gupta:CA” so you can build the list of keys to retrieve via batch read. i.e. [Gupta:CA:0, Gupta:CA:1, … Gupta:CA:xxx (last)]
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Composit Key | 17 | 5017 | March 17, 2020 | |
| How to make sure a record with composite key goes to same partition? | 1 | 1569 | March 17, 2020 | |
| Is it possible to use primary key along with secondary key in Aerospike for fetching a record? | 7 | 1751 | March 30, 2021 | |
| Versioning Support in Aerospike | 3 | 2009 | March 26, 2020 | |
| Can I use split keys in Aerospike? / Con Aerospike, puedo consultar claves parciales? | 4 | 2290 | December 2, 2015 |