How to create secondary index on multiple fields (composite key)

In Aerospike, a secondary index is built on a single field, but you can separately create a secondary index on multiple fields. A query requires and uses a secondary index only on the field of the query predicate. Multiple secondary indexes in the namespace can be useful if you query the records separately using different queries, each using its own secondary index. If your filter has multiple fields, use the most selective (ie, that returns fewest records) portion of the predicate as the query predicate, and specify the remaining portion as a filter expression in the policy. (Hope this helps as I am assuming these abstractions are accessible through Spring Data Aerospike,)