tsearch2::build_query_postgres (private)
tsearch2::build_query_postgres [ -query query ]
Defined in packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl
Convert conjunctions to query characters for tsearch2 use websearch_to_tsquery which is integrated in postgres >= 11 websearch_to_tsquery creates a tsquery value from querytext using an alternative syntax in which simple unformatted text is a valid query. Unlike plainto_tsquery and phraseto_tsquery, it also recognizes certain operators. Moreover, this function should never raise syntax errors, which makes it possible to use raw user-supplied input for search. The following syntax is supported:
For further documentation see also: https://www.postgresql.org/docs/11/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES
- unquoted text: text not inside quote marks will be converted to terms separated by & operators, as if processed by plainto_tsquery.
- "quoted text": text inside quote marks will be converted to terms separated by <-> operators, as if processed by phraseto_tsquery.
- OR: logical or will be converted to the | operator.
- -: the logical not operator, converted to the ! operator.
- Switches:
- -query (optional)
- string to convert
- Returns:
- returns formatted query string for tsearch2 tsquery
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.