should i use supabase text search or algolia?
I need a basic varchar text search for finding rows from my db. There's textSearch option in supabase
33 Replies
100% don't use a second database if you don't need one. The supabase text search is definitely sufficient for most needs. - https://code.build/p/6KPQqmE2wsVdYaRZiAVDzF/supabase-fuzzy-full-text-search
Supabase Fuzzy Full Text Search - Code.Build
Full Text Search Postgres supports many full-text search options. Your options include:- [LIKE](https://www.postgresql.
i did this

any idea why its not working?

i am getting this as the result
are you using sdk v2?
this is the version i am using
i think its the latest version
It works with certain queries? I am using the RC v2 js sdk, so not sure if that matters here
wdym certain queries?
the normal selects, inserts works fine
so what doesn't work?
this one
So the query "cet g" does not work?
but everything else does?
yeah only the textSearch function is not working
its the text i am searching for
nope still not working

i think spaces are not working
are you using spaces in your phrases?
try
.textSearch('title', query, { type: 'phrase' });

it works but its not returning anything

i have this in my table
even typing the whole thing doesn't return anything
does 'cet' work?
no

what does your full query look like in js?

like this
I'm wondering if you need to make the
varchar
a text
field, or if you need to add an index like this:
or similar
I honestly have no idea at this point, this should work unless it is one of those two things...
Or you're leaving something out...
oh, change to.select('*')
... see if that helpsI tried adding a text column for testing
Its the same
try creating an index on it, not sure if that is necessary
supabase js sdk uses postgrest under-the-hood, so not sure if this can help you - https://postgrest.org/en/stable/api.html?highlight=full%20text#full-text-search
Thanks man!
It was a stupid mistake on my part
What was it?
its not fixed yet
i thought it was the rls but it wasn't
ok its fixed now
it was a combination of some other things like rls, filters
Thanks again!