JavaScript: Match a string

Examples

Text search

const \{ data, error \} = await supabase
  .from('quotes')
  .select('catchphrase')
  .textSearch('catchphrase', `'fat' & 'cat'`, \{
    config: 'english'
  \})

Basic normalization

const \{ data, error \} = await supabase
  .from('quotes')
  .select('catchphrase')
  .textSearch('catchphrase', `'fat' & 'cat'`, \{
    type: 'plain',
    config: 'english'
  \})

Full normalization

const \{ data, error \} = await supabase
  .from('quotes')
  .select('catchphrase')
  .textSearch('catchphrase', `'fat' & 'cat'`, \{
    type: 'phrase',
    config: 'english'
  \})

Websearch

const \{ data, error \} = await supabase
  .from('quotes')
  .select('catchphrase')
  .textSearch('catchphrase', `'fat or cat'`, \{
    type: 'websearch',
    config: 'english'
  \})