Hello, Is there a way to pass an or expression to...
# community-help
m
Hello, Is there a way to pass an or expression to the _filter_by_ argument? Using "||" or "|" returns an Error 400 Could not parse the filter query
k
The filter by query supports only basic operators. What query do you want to make?
👍 1
m
For example filter by _num_employees:>100 or country:= USA_
k
We currently support only
&&
so you can do ANDing of conditions on two different fields, but can't do OR.
You can do OR within a single field by using a list filter operation, e.g:
store_id: [100, 200, 300]
r
multisearch and dedup on the client side, a bit more work involved but should do it.
m
My solution is to add a field to my documents that contains the OR of the fields that i want to filter_by since they're all boolean
k
👍 More flexible query operations is on roadmap, so hopefully you won't need it sometime in future 🙂
💯 1