Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

Alexander Korotkov <aekorotkov@gmail.com>

From: Alexander Korotkov <aekorotkov@gmail.com>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>, Teodor Sigaev <teodor@postgrespro.ru>, Oleg Bartunov <obartunov@postgrespro.ru>
Date: 2021-05-02T18:12:44Z
Lists: pgsql-bugs, pgsql-hackers
On Sun, May 2, 2021 at 9:06 PM Zhihong Yu <zyu@yugabyte.com> wrote:
> +                   /* Everything is quotes is processed as a single token */
>
> is quotes -> in quotes
>
> +                   /* iterate to the closing quotes or end of the string*/
>
> closing quotes -> closing quote
>
> +                   /* or else ƒtsvector() will raise an error */
>
> The character before tsvector() seems to be special.

Thank you for catching.  Fixed in v3.

------
Regards,
Alexander Korotkov



Commits

  1. Make websearch_to_tsquery() parse text in quotes as a single token