I'm trying to create the fastest way to search millions (80+ mio) of records in a PostgreSQL (version 9.4), over multiple columns.
I would like to try and use standard PostgreSQL, and not Solr etc.
I'm currently testing Full Text Search followed https://blog.lateral.io/2015/05/full-text-search-in-milliseconds-with-postgresql/.
It works, but I would like some more flexible way to search.
Currently, if I have a column containing ex. "Volvo" and one containing "Blue" I am able to find the record with the search string "volvo blue", but I would like to also find the record using "volvo blu" as if I used LIKE and "%blu%'.
Is that possible with full text search?
bluvs.blueis not a match, but f.ex.volvo,volvosandvolvo'sare). -- If you can upgrade to 9.6, thepg_trgmhas a nice new feature in it: word similarity, which might handle your use cases.pg_trgmis especially good in it). After you found matches, you can offer your end-users the possibility to search for those instead in a 2nd step (similarly f.ex. how google handles when you misspell words).