How to use "like" operator in aerospike

I am trying to build cache invalidation.

Aerospike currently does not have a “like” operator; however, the same operation can be achieved with the cmp_regex” expression.

Thanks…can it work on keys as well?

Yes, you would use it with the key_str() expression.

If used in a filter, the following will return all records with keys containing the string “search_string”:

cmp_regex(".*search_string.*", 0, key_str())

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.