Function: toTsQuery()
toTsQuery(
terms,operator?):string
Compile terms into a to_tsquery input where every term is a PREFIX, so a
partially typed word still matches (intel:* reaches intelligence).
Terms carry only letters and digits by construction, so none of tsquery’s
operators (& | ! ( ) : *) can survive from user input into the compiled
string.
Parameters
Section titled “Parameters”readonly string[]
operator?
Section titled “operator?”"&" | “|”
Returns
Section titled “Returns”string