Filter and logical operators: how many filters per query does Aerospike support?


#1
stmt := as.NewStatement("asd", "asd")    
stmt.Addfilter(as.NewEqualFilter("Name", ""))
stmt.Addfilter(as.NewEqualFilter("Name", "string"))

This code will search Name = “” || “string” or Name = “” && “string”?
How search Bin Name which contain “” or “string”?
Thanks.


#2

At the moment, only one filter is supported by Aerospike Server per query.


#3

Only one Bid name or only one filter?

stmt.Addfilter(as.NewEqualFilter("Name1", "string1"))
stmt.Addfilter(as.NewEqualFilter("Name2", "string2"))

Not work?


#4

No that won’t work.

Only a single filter is allowed through the driver, you have to use a UDF if you want to filter on more properties.


#5

Maybe this should return an error or even panic client-side, when trying to add a second filter?

Also, documentation could be improved. AddFilter kind of implies that multiple filters can be added. Just opened a PR for that (https://github.com/aerospike/aerospike-client-go/pull/98).