Search code examples
postgresqlgoogle-cloud-sql

Using dict_xsyn extension for synonym dictionary during text search on Google Cloud SQL


Cloud SQL databases support the extension dict_xsyn according to the documentation (https://cloud.google.com/sql/docs/postgres/extensions). However, I can't seem to figure out how to utilize the extension. I need to reference a file containing the list of synonyms, which must be stored in $SHAREDIR/tsearch-data. I can't seem to access such directory on a managed Cloud SQL instance. The default dict_sxyn configuration appears to contain no synonyms which makes the extension rather useless. Is there any other way to utilize the extension that I might have missed? Is there a way to access the tsearch-data directory on Cloud SQL? Is there a different way to get a thesaurus (or synonym) dictionary configured for text search on Cloud SQL?


Solution

  • I'm afraid that the feature is not really supported, I found this issue tracker asking for a process to use correctly this extension.

    An user highlighted that the impossibility to add the dictionary file comes into the feature to not be really supported, as mentioned in the last comment