FINE TUNING FULL TEXT SEARCH WITH POSTGRESQL 12
FLEXING POSTGRES 12
Trying to decide between
to_tsquery
,plainto_tsquery
andphraseto_tsquery
can be difficult. It was kind of straightforward in our case – we’re not searching on any phrases really.The Postgres team decided to be helpful in this regard, especially when it comes to web applications, so they created
websearch_to_tsquery
. It basically treats the input as if it were entered into a Google search. To be dead honest I have no idea what’s happening under the covers here, but it’s supposed to be a bit more intelligent thanplainto_tsquery
and a little less strict thanphraseto_tsquery
.