We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentc2e5631 commitb82323eCopy full SHA for b82323e
contrib/pg_trgm/README.pg_trgm
@@ -100,11 +100,15 @@ Tsearch2 Integration
100
The first step is to generate an auxiliary table containing all
101
the unique words in the Tsearch2 index:
102
103
-CREATE TABLE words AS
104
-SELECT word FROM stat('SELECT vector FROM documents');
105
-
106
-Where 'documents' is the table that contains the Tsearch2 index
107
-column 'vector', of type 'tsvector'.
+CREATE TABLE words AS SELECT word FROM
+stat('SELECT to_tsvector(''simple'', bodytext) FROM documents');
+
+Where 'documents' is a table that has a text field 'bodytext'
+that TSearch2 is used to search. The use of the 'simple' dictionary
108
+with the to_tsvector function, instead of just using the already
109
+existing vector is to avoid creating a list of already stemmed
110
+words. This way, only the original, unstemmed words are added
111
+to the word list.
112
113
Next, create a trigram index on the word column:
114