Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

251
Visualizações
How do you perform a full text search via the Supabase Rest API?

Please can someone help provide the correct syntax for the request when making the full-text search query when making a REST API request?

I've been looking at the Supabase docs, and I'm sure you can perform full-text searches generally: https://supabase.com/docs/guides/database/full-text-search https://supabase.com/docs/reference/javascript/textsearch

However I'd like to perform the search by using the REST API. Here are a few examples of things I've tried so far:

  1. https://apikey.supabase.co/rest/v1/table?field=textSearch.%28"query"%29
  2. https://apikey.supabase.co/rest/v1/table?field=to_tsquery.%28"query"%29
  3. https://apikey.supabase.co/rest/v1/table?select=*&to_tsquery=field.query
  4. https://apikey.supabase.co/rest/v1/table?select=*&to_tsquery=field.query

P.S. I also attempted to use this type of format: https://github.com/supabase/supabase/discussions/1069

Any help would be much appreciated, thanks!

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Supabase uses postgREST for their REST API. You can check the postgREST documentation for this feature.

The fts filter has a number of options to support flexible textual queries, namely the choice of plain vs phrase search and the language used for stemming. Suppose that tsearch is a table with column my_tsv, of type tsvector. The following examples illustrate some possibilities:

GET /tsearch?my_tsv=fts(french).amusant HTTP/1.1

GET /tsearch?my_tsv=plfts.The%20Fat%20Cats HTTP/1.1

GET /tsearch?my_tsv=not.phfts(english).The%20Fat%20Cats HTTP/1.1
Operator Meaning
fts Full-Text Search using to_tsquery
plfts Full-Text Search using plainto_tsquery
phfts Full-Text Search using phraseto_tsquery
wfts Full-Text Search using websearch_to_tsquery
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda