Best search engine solution (FF+Supabase 02.2024)

Hi!
I would like to ask what do you think is currently the best solution to create a search engine in FF connected to Supabase?

Let's imagine a functional search engine:
- text field for entering the search phrase
- filters (e.g. price, category)
- maybe some keywords that act as tags

My current solution.
I made a function on supabase that combines columns to have all the clients data in one column.
In FF I used a custom function that I run when user starts typing in the text field.

Future<List<dynamic>?> searchClients(String searchField) async {
  // Add your function code here!
  final supabase = SupaFlow.client;
  final response = await supabase
      .from('clients')
      .select()
      .ilike('clients_all_columns', '%${searchField}%')
      .limit(10)
      .order('created_at', ascending: false);

  return response;

I put the response from supabase into the page state and complete the listview based on the page state.

It works, but I would like the search engine to be more functional, add filters, etc., so I wonder how you solved it.

1 reply