Suggestion for filtering based on multiple predicate

I have been through several forum discussions and found that there is limited support for querying Aerospike with multiple predicates.
One solution is to use UDFs to further filter out the resuts. Like in this post.

I have a data which contains Date, Integer, and String fields.
Is it possible for me to filter records using all the following predicates together:

  • Equality on String fields
  • Range query on Integer field.
  • Range query on Date fields

If so, how can I do so. I am ok with UDF logic too if that’s the only possible solution.

@pisush Could you please help me with this. Thanks.

Here, I was able to use predexp to filter on 2 fields, but date range filtering is still a mystery to me.

Perhaps I have to convert my dates to Unix timestamps.

Hey Aditya,

Record last update time can be included in the predicate expressions. Here’s a good read about it:

And here’s another example of using predicate filters using just a time range:

Important note: As of Aerospike Database 5.2, Predicate Expressions (PredExps) are obsolete. Please use Aerospike Expressions instead. The Aerospike Server and Client will support both Predicate Expressions (PredExps) and Aerospike Expressions until November 2021. From November 2021 support for Predicate Expressions will be removed from both Aerospike server and clients. (From Documentation | Aerospike)

Cheers

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