Postgres full-text search is Good Enough!
Created: 2023-02-13T03:09:58-06:00
Return to the Index
This card pertains to a resource available on the internet.
- Concatenating all searchable fields to a single large string
- Using `to_tsvector` function to convert the long string in to a word vector for search
- Using `@@` to match a tsvector against a query
- Using `ts_rank` to obtain a relevance score for a query against a document and sorting by document relevancy
- Using `pg_trgm` to create trigrams out of search terms in documents. Trigrams are then used to detect misspelled words.
@@ operator