I have a database of products which I do a full-text search on using pg_search Gem. The query looks something like this:
SELECT "products".* FROM "products" WHERE (((to_tsvector('english', coalesce("products"."description"::TEXT, ''))) @@(to_tsquery('english', ''' ' || 'purchase' || ' '''))));
As I am doing a Full-text search, I want to add the search functionality for following
Now, a notable problem with this search is, when somebody searches any of these, I need to search products for all of these terms(synonyms and near by word and spelling mistake).
But it seems we need to give the synonyms dictionary as input to have this kind of search functionality. How to add custom dictionary to PostgreSQL? Even if we manage to add synonyms dictionary to postgresql, How can we add this to my AWS RDS (Amazon RDS for PostgreSQL) database?
Refer link for synonyms: http://shisaa.jp/postset/postgresql-full-text-search-part-2.html
According to this thread, it's not possible at the moment (2020).
Unfortunately, because RDS doesn't provide filesystem access, you won't be able to upload your custom files to $SHAREDIR.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With