Im using aerospike rest gateway 2.0.2. I want to filter on a bin during the scanAll process. For that Im looking to set filterExp. It expects a string. I have seen JAVA examples directly but not for rest gateway.
My project is in PHP. I assume I need to write some expressions and base64 encode it. But how to write those expressions with rest gateway ?
A case we can consider:
Write a expression for : getting all the data of set S where bin B is greater than X and less than Y.
There are examples in other languages as well on the developer hub. Did you check the filter expressions section and would examples in some of the other languages help? (I am not much familiar with the REST Gateway). You would then use such filter expression on the back of a primary index query (scan).
You may also consider using a secondary index on bin B, assuming it is an integer for which you can simply do a range query. There is an example in the REST Gateway documentation:
Filter values numeric values within a range. Only allowed on bin which has a secondary index defined.
The bin for which a secondary-index is defined.
Filter begin value inclusive.
Filter end value inclusive.
Array [ 4 ]