On Tuesday, July 27, 2021, PG Bug reporting form <noreply(at)postgresql(dot)org>
wrote:
>
> postgres=# select websearch_to_tsquery('english', 'foo bar or baz');
> websearch_to_tsquery
> -----------------------
> 'foo' & 'bar' | 'baz'
> (1 row)
>
> Expected: 'foo' & ('bar' | 'baz')
>
>
The documentation describes the operator precedence and it isn’t what you
expect.
https://www.postgresql.org/docs/current/datatype-textsearch.html#DATATYPE-TSQUERY
David J.