Error Code 4: Parameter error

Using aerospike community 3.2.8

And Java Client aerospike-client-3.0.23-jar-with-dependencies

I’m creating and async client like so…

aclient = new AsyncClient(“localhost”, 3000); aclient.createIndex(null, “…”, “…”, “…”, “…”, IndexType.NUMERIC); aclient.createIndex(null, “…”, “…”, “…”, “…”, IndexType.NUMERIC); aclient.createIndex(null, “…”, “…”, “…”, “…”, IndexType.STRING); aclient.createIndex(null, “…”, “…”, “…”, “…”, IndexType.STRING);

Then trying to query

Statement stmt = new Statement(); stmt.setNamespace(“risk”); stmt.setBinNames(“…”,“…”, “…”, “…”, “…”, “…”, “…”, “…”, “…”, “…”, “…”); stmt.setFilters( Filter.equal(“…”,…), Filter.equal(“…”,…), Filter.equal(“…”,…), Filter.equal(“…”,…), ));

QueryPolicy policy = new QueryPolicy(); policy.timeout = 10000; RecordSet rs = aclient.query(policy, stmt);

while (rs.next()) { System.out.println( rs.getRecord().getValue(“…”) + “, " + rs.getRecord().getValue(”…“) + “, " + rs.getRecord().getValue(”…”) + “, " + rs.getRecord().getValue(”…“) + “, " + rs.getRecord().getValue(”…”) + “, " + rs.getRecord().getValue(”…") + ", " ); }

So the docs say check the parameters… But i don’t see what is wrong with the above code…

Question #2 if multiple filters is an AND or OR predicate?

Ok if I use 1 parameter it works…

My question then would be how can I do an OR query then?

So in SQL we would have…

SELECT * FROM table WHERE field1 = ? OR field2 = ?

At present queries filters with “OR” are not supported. You may have to handle the logic on the client side.

–Lucien