Open blasterpistol opened 4 years ago
I'm not familiar with pg_trgm
, but it should definitely be doable. As a starting point, consider looking at https://github.com/graphile-contrib/postgraphile-plugin-connection-filter-postgis which extends this plugin with PostGIS-specific operators.
Caveat: if you need ORDER BY
, there'll be more work involved. This plugin is only concerned with augmenting the WHERE
clause.
I'm interested, too. Do you have some code example for fetching all text/varchar columns, that are covered by an index using gist or gin?
Probably the fulltext plugin could be a related use case: https://github.com/mlipscombe/postgraphile-plugin-fulltext-filter
Currently I have the query
I will be grateful for adding this functionality to the library, or instructions on how to write this plugin yourself.