prisma icon indicating copy to clipboard operation
prisma copied to clipboard

Postgres: Alternatives to `to_tsquery`

Open jwueller opened this issue 2 years ago • 1 comments

I would like to propose adding support for configuring alternatives to to_tsquery, namely plainto_tsquery, phraseto_tsquery and websearch_to_tsquery, as it would significantly improve the usefulness of the Postgres full-text search implementation.

Reference to Postgres documentation: https://www.postgresql.org/docs/14/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES

Specifically, websearch_to_tsquery is recommended by Postgres for dealing with raw user input, which I assume is likely the majority of use-cases.

I am happy to attempt a PR if I there is a consensus on how exactly you would wish this to be implemented.

jwueller avatar Sep 14 '23 18:09 jwueller

Related discussion: https://github.com/prisma/prisma/issues/15141

jgebhardt avatar Jan 22 '24 05:01 jgebhardt