Sandeep B
Sandeep B

Reputation: 775

Aerospike: How to perform IN query on secondary index

How to perform (sql like) IN queries in aerospike on secondary index. Do we need an UDF for this?

Something like this: Select * from ns.set where si_bin in (1,2,3)

Is there anything available in java aerospike client?

PS: Dont want a range query or that sort.

Upvotes: 2

Views: 239

Answers (1)

pgupta
pgupta

Reputation: 5415

You can use predicate filtering. https://www.aerospike.com/docs/guide/predicate.html

Python client documentation for predicate filtering has examples for using the aerospike.predexp helper.

The Java client has examples for class PredExp in the repo.

Upvotes: 3

Related Questions