Hi, I have been testing Aerospike for our use case and wanted to know does aerospike provide support for query like:-
Select * from test.test-set where secondary-index is like ‘%value%’.
Same as like MYSQL supports.
Hi, I have been testing Aerospike for our use case and wanted to know does aerospike provide support for query like:-
Select * from test.test-set where secondary-index is like ‘%value%’.
Same as like MYSQL supports.
Aerospike is primarily a key-value store, so this isn’t something you would want to do regularly or expecting good performance. One way to work around this is by indexing on the fly, as Piyush explained here One to many relationship with filter - #6 by pgupta. You could also accomplish a regex/wildcard match across all the data using predicate filtering, https://www.aerospike.com/docs/guide/predicate.html, but it is very heavy on the system and you might should explore alternatives first.
Can we know more about your use case?
Albot, I am trying to build cache invalidation strategy for our systems and every place we might not have primary key to expire the cache. so i need secondary index on string bin and value can very dynamic like
{id1}-{id2}-{id3}-**
So i would like to invalidate the cache based on like query matching id2-id3 or id1-id2
One way is to have all records with a short TTL (say 1 day / 30 days whatever makes sense in your model) and keep the records that you are reading from cache by additionally “touching” them and thereby updating their TTL. Let the others that you have not read for TTL days expire on their own.