Aerospike aggregation problem

Hello, I am using aerospike and try to retrieve records using several filters in aerospike-client-ruby (Https:// it looks the following way:

aerospike = Aerospike :: ("", 3000)

stmt = Aerospike :: (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

for more filters always returns nil

In aerospike is the mechanism of aggregation and stream UDF, but according to the documentation, 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


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.

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.