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,)
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
How to find all records by multi keys in secondary index | 20 | 7559 | May 24, 2017 | |
Is it possible to use primary key along with secondary key in Aerospike for fetching a record? | 7 | 1669 | March 30, 2021 | |
Client queries using multiple filters | 5 | 5921 | January 26, 2017 | |
Is it recommended to use aerospike to filter on some field | 1 | 1152 | March 30, 2020 | |
Limit on the number of secondary indexes on Map keys
|
9 | 563 | March 18, 2023 |