Read Query
In Posgres, Full text indexing allows documents to be preprocessed and an index saved for later rapid searching. Preprocessing includes:
Parsing documents into tokens.
Converting tokens into lexemes.
Storing preprocessed documents optimized for searching.
tsvector type is used in Postgres for full text search
tsvector type is different than text type in below aspects:
Eliminates case. Upper/lower case letter are identical
Removes stop words ( and, or, not, she, him, and hundreds of others)-because these words are not relevant for text search
Replaces synonyms and takes word stems (
elephant->eleph). In the full text catalogue, it does not have the wordelephantbut the wordelep.Can (and should) be indexed with GIST and GIN
Custom ranking with weights &
ts_rank
How Elastic search(search engine) has advantage over full text search in Postgres?