toTsQuery static method

String toTsQuery(
  1. String text
)

Convert text into a Supabase-compatible tsquery string.

Joins extracted keywords with & (AND operator). Returns an empty string if no keywords are extracted.

Implementation

static String toTsQuery(String text) {
  final keywords = extract(text);
  if (keywords.isEmpty) return '';
  return keywords.join(' & ');
}