ts_rewrite ( query tsquery, target tsquery, substitute tsquery ) → tsqueryReplaces occurrences of
target with substitute within the query. See Section 12.4.2.1 for details.ts_rewrite('a & b'::tsquery, 'a'::tsquery, 'foo|bar'::tsquery) → 'b' & ( 'foo' | 'bar' )