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

Zhihong Yu <zyu@yugabyte.com>

From: Zhihong Yu <zyu@yugabyte.com>
To: Alexander Korotkov <aekorotkov@gmail.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:21:14Z
Lists: pgsql-bugs, pgsql-hackers
On Sun, May 2, 2021 at 11:12 AM Alexander Korotkov <aekorotkov@gmail.com>
wrote:

> 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
>

Hi,
One minor comment:
+                   /* iterate to the closing quotes or end of the string*/

closing quotes -> closing quote

Cheers

Commits

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