Hi! Can anyone help me how can I achieve the searc...
# javascript
s
Hi! Can anyone help me how can I achieve the search functionality like Instagram with Supabase Current Code
Copy code
let { data, error } = await supabase_connect
      .from("Users")
      .select("name, username, verified, image_url")
      .ilike("name", `%${req.body.name}%`)
      .range(req.body.skip, req.body.limit);
Tried
.textSearch()
but it didn't worked out what actually I wanted.
s
Move the conversation here, from what you are asking you want to remove the last
%
at the end of your
.ilike
.
s
I did but the surname is not getting search
s
Yes because its not the end
s
as there is a gap between the name
Like
Sayan Nath
s
What you are after requires more complex search query
s
yes
s
like
cannot give you that result
s
ya so what should be the approach to get the result
s
Do a google search on how to do that sort of complex search with SQL and you can use what you find and create a Postgres function then call it via the supabase
.rpc
function
s
Thanks for the help