How to search across multiple columns and tables

Hi guys. For our app I want to implement a "global search". Basically a search field in the top nav bar where users can enter a (part of) a vendor / client / product / ... name / description / ID etc. It can be just a simple case-insensitive matching ala LIKE, doesn't have to be super smart.
What options do I have to implement this with Postgres / Supabase JS client?
The only thing that comes to mind is a VIEW with UNION ALL or similar. But then do something like this with Supabase JS client:
.or('like.id.%search string%, like.name.%search string%')

Any ideas are welcome!
Was this page helpful?