Aerospike aggregation problem

Hello, I am using aerospike and try to retrieve records using several filters in aerospike-client-ruby (GitHub - aerospike/aerospike-client-ruby: Ruby client for the Aerospike database) it looks the following way:

aerospike = Aerospike :: Client.new ("127.0.0.1", 3000)

stmt = Aerospike :: Statement.new (namespace, set)
stmt.filters << Aerospike :: Filter.Range ("Bin1", 1, 50)
stmt.filters << Aerospike :: Filter.Range ("Bin2", 50, 100)

rs = aerospike.query (stmt)
rs.each to | rec |
   puts rec.bins.inspect
end

for more filters always returns nil

In aerospike is the mechanism of aggregation and stream UDF, but according to the documentation http://www.aerospike.com/docs/guide/aggregation.html, http://www.aerospike.com/docs/udf/developing_stream_udfs.html is not possible in Ruby.

Is there any possibility to do this, except:

  1. The use of one filter and further operations in Ruby?
  2. write extensions in C that uses the c-client (which supports those options), and calling him with ruby

Hi,

Aerospike server doesn’t support more than one filter. As a workaround, you can use one of the filter with the highest selectivity, and then filter the rest on the client side.