Re: Phrase search vs. multi-lexeme tokens - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Phrase search vs. multi-lexeme tokens
Date
Msg-id CAPpHfdsK9C-X-ag7ktK=j5dcT0Qo2WWY_gLWgPShe2yQyDBm+g@mail.gmail.com
Whole thread Raw
In response to Re: Phrase search vs. multi-lexeme tokens  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: Phrase search vs. multi-lexeme tokens  (Neil Chen <carpenter.nail.cz@gmail.com>)
List pgsql-hackers
On Thu, Jan 7, 2021 at 6:36 AM Alexander Korotkov <aekorotkov@gmail.com> wrote:
>
> > I read your patch over quickly and it seems like a reasonable
> > approach (but sadly underdocumented).  Can we extend the idea
> > to fix the to_tsquery case?
>
> Sure, I'll provide a revised patch.

The next version of the patch is attached.  Now, it just makes
to_tsquery() and websearch_to_tsquery() use phrase operator to connect
multiple lexemes of the same tsquery token.  I leave plainto_tsquery()
aside because it considers the whole argument as a single token.
Changing it would make it an equivalent of phraseto_tsquery().

------
Regards,
Alexander Korotkov

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: strange error reporting
Next
From: Robert Haas
Date:
Subject: Re: strange error reporting