January 2019
Beginner
556 pages
14h 19m
English
The tsvector datatype is a sorted list of distinct lexeme. A lexeme is the fundamental unit of a word. Simply speaking, you can think of a lexeme as the word's root without a suffix, inflectional forms, or grammatical variants. The following example shows casting text to a tsvector:
postgres=# SELECT 'A wise man always has something to say, whereas a fool always needs to say something'::tsvector; tsvector -------------------------------------------------------------------------------------------- 'A' 'a' 'always' 'fool' 'has' 'man' 'needs' 'say' 'say,' 'something' 'to' 'whereas' 'wise'(1 row)
Casting a text to tsvector doesn't normalize the document completely, due to the lack of linguistic rules. To normalize the preceding ...
Read now
Unlock full access