is there a way to have fallback filters, like in t...
# community-help
j
is there a way to have fallback filters, like in this example if the explicit first filter fails it falls back to the proximity one?
filter_by: lane.origin.name:='${originName}' && lane.origin.geolocation:(${originLat}, ${originLng}, ${radiusMiles} mi)
j
You can use optional "filtering" via sorting to kinda do this: https://typesense.org/docs/27.1/api/search.html#sorting-based-on-conditions
Basically convert the filter into a sort by, so the filters become optional
But there's no direct way of doing what you need precisely, except for doing one query first with one filter, check the results and then do a follow up query if needed
j
thank you @Jason Bosco!
👍 1