Trigrams: Showing similar results in Postgres (Typos)
If you search “trgrams in pstgres” in Google, you’ll get results for “trigrams in postgres”. To say that is useful is an understatement! Recently at work I wanted to search a table of tags, but I wanted to account for spelling mistakes. Just because the user is 1 letter off doesn’t mean I shouldn’t give them a meaningful search result. This is especially true with mobile users, where spelling mistakes are all the more common (even with keyboard corrections). We are going to use the Trigram feature in Postgres to help us achieve this.