The PostgreSQL extension pg_trgm provides similarity(), the % operator and trigram operator classes for GIN indexes, which also speed up LIKE '%text%'.
Trigram
A group of three consecutive characters; comparing the trigram sets of two strings gives a similarity score used for fuzzy matching.