Re:Postgres Full Text Search vs. the Rest
by hardwaresofton on Friday October 14, 2022 @10:21AM
(#33203870)
Absolutely -- this is something I didn't include in the article -- it wasn't really fast-search/type-ahead search per say.
Gitlab actually has a great article about this for those who want to read more:
https://about.staging.gitlab.com/blog/2016/03/18/fast-search...
That's where trigrams come in. pg_trgm can fix mis-spellings, and even compound words ("super man" to "superman"). I opt for performing the search as entered, and use trigrams to offer suggestions to the user, e.g. do the search for "suprman", but show an option to search for "superman".