This question may like a duplicate question but I’m giving it back because I couldn’t perfect a solution. Sorry for that. Now I’m working on a drug search engine. The user cannot always enter the exact drug name. Depending on the characters entered by the user, I need to get a better result for them. But now it is not.
Tag: fuzzy-search
Similarity function in Postgres with pg_trgm
I’m trying to use the similarity function in Postgres to do some fuzzy text matching, however whenever I try to use it I get the error: If I add explicit casts to text I get the error: My query is: Do I need to do something to initalize pg_trgm? Answer You have to install pg_trgm. In debian, source this sql: