Query records with BETWEEN operator


Hi All,

I’m pretty much new to Aerospike. I have a set ‘IPtoCountry’ with an integer as key and following Bins.

IpStartingRange ==> Integer IpEndingRange ==> Integer CountryCode ==> String

I want to query country code where a particular IP belongs to. In sql I can do that as follows. Assume passed IP value is ‘accessingIP’

select CountyCode from IPtoCountry where accessingIP between IpStartingRange and IpEndingRange;

I went through documentation and couldn’t find out a way to achieve this from AQL. Can anyone help me to achieve this?

Thank you in advance…



There is an active conversation happening over here which I believe is on point with your question.


Thank you kporter. I’ll look into that