Get entries from Map<String, List> depending on list's values range

Hey there.

So, I have following data structure:

In some particular {namespace, set, key, bin} I store Map<String, List>.

The map’s values (list) always contain 5 values, which data types goes as following - (long, String, long, boolean, long).

The problem - depending on the case, I need to get Map entries on the it’s elements range, the one’s which are ‘long’ data type using Java API.

So, till now I’ve used MapOperation.getByValueRange API on getting Map entries for the range of it’s values 1st element (long), by passing List(min/max, null) for defining range boundaries - and it was giving me what I needed.

But now, in some cases I need to get data depending on range of 3rd element (also long). So I’ve tried using MapOperation.getByValueRange providing to it Lists with min/max values, but nothing worked out. I’ve tried different things in min/max Lists (providing for first element null-null, null-inf, even wildcard) - but never succeed.

More to say - in some cases I need to get data by range on 3rd element and 4th element has particular value, let’s say ‘true’.

Today I’ve also found article, in the end of which it’s kind of being said that at the moment it’s only possible to search range only by the 1st element in such case (link:

So, considering I’m resticted on chaching data structure, the questions are:

  1. Is it possible to get Map entries with values as List on the range defined by not the 1st element? If so - how?
  2. If it’s not possible - what are the possible options for this case?
  3. Also, is it possible to get range by several list elements, one of them is being boolean?
  4. If I can change/optimize data structure - are there any more options to solve the problem?

I’d appreciate any help, thanks in advance.

There’s currently no way to do this with CDT operations. The only way is UDF using lua.

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