30
30
<row>
31
31
<entry>American English</entry>
32
32
<entry><filename>hunspell_en_us</filename></entry>
33
- <entry><literal>public. english_hunspell</literal></entry>
34
- <entry><literal>public.english </literal></entry>
33
+ <entry><literal>english_hunspell</literal></entry>
34
+ <entry><literal>english_hunspell </literal></entry>
35
35
</row>
36
36
<row>
37
37
<entry>Dutch</entry>
38
38
<entry><filename>hunspell_nl_nl</filename></entry>
39
- <entry><literal>public. dutch_hunspell</literal></entry>
40
- <entry><literal>public.dutch </literal></entry>
39
+ <entry><literal>dutch_hunspell</literal></entry>
40
+ <entry><literal>dutch_hunspell </literal></entry>
41
41
</row>
42
42
<row>
43
43
<entry>French</entry>
44
44
<entry><filename>hunspell_fr</filename></entry>
45
- <entry><literal>public. french_hunspell</literal></entry>
46
- <entry><literal>public.french </literal></entry>
45
+ <entry><literal>french_hunspell</literal></entry>
46
+ <entry><literal>french_hunspell </literal></entry>
47
47
</row>
48
48
<row>
49
49
<entry>Russian</entry>
50
50
<entry><filename>hunspell_ru_ru</filename></entry>
51
- <entry><literal>public. russian_hunspell</literal></entry>
52
- <entry><literal>public.russian </literal></entry>
51
+ <entry><literal>russian_hunspell</literal></entry>
52
+ <entry><literal>russian_hunspell </literal></entry>
53
53
</row>
54
54
</tbody>
55
55
</tgroup>
63
63
We can test created configuration:
64
64
65
65
<programlisting>
66
- SELECT * FROM ts_debug('public.english ', 'abilities');
66
+ SELECT * FROM ts_debug('english_hunspell ', 'abilities');
67
67
alias | description | token | dictionaries | dictionary | lexemes
68
68
-----------+-----------------+-----------+---------------------------------+------------------+-----------
69
69
asciiword | Word, all ASCII | abilities | {english_hunspell,english_stem} | english_hunspell | {ability}
@@ -78,17 +78,17 @@ SELECT * FROM ts_debug('public.english', 'abilities');
78
78
create mixed russian-english configuration:
79
79
80
80
<programlisting>
81
- CREATE TEXT SEARCH CONFIGURATIONpublic. russian_en (
82
- COPY =pg_catalog. simple
81
+ CREATE TEXT SEARCH CONFIGURATION russian_en (
82
+ COPY = simple
83
83
);
84
84
85
- ALTER TEXT SEARCH CONFIGURATIONpublic. russian_en
85
+ ALTER TEXT SEARCH CONFIGURATION russian_en
86
86
ALTER MAPPING FOR asciiword, asciihword, hword_asciipart
87
- WITHpublic. english_hunspell,pg_catalog. english_stem;
87
+ WITH english_hunspell, english_stem;
88
88
89
- ALTER TEXT SEARCH CONFIGURATIONpublic. russian_en
89
+ ALTER TEXT SEARCH CONFIGURATION russian_en
90
90
ALTER MAPPING FOR word, hword, hword_part
91
- WITHpublic. russian_hunspell,pg_catalog. russian_stem;
91
+ WITH russian_hunspell, russian_stem;
92
92
</programlisting>
93
93
94
94
</para>
@@ -104,7 +104,7 @@ ALTER TEXT SEARCH CONFIGURATION public.russian_en
104
104
to use. For example, in this text you can search some words:
105
105
106
106
<programlisting>
107
- SELECT to_tsvector('public.english ', 'The blue whale is the largest animal');
107
+ SELECT to_tsvector('english_hunspell ', 'The blue whale is the largest animal');
108
108
to_tsvector
109
109
-----------------------------------------
110
110
'animal':7 'blue':2 'large':6 'whale':3
@@ -117,8 +117,8 @@ SELECT to_tsvector('public.english', 'The blue whale is the largest animal');
117
117
Search query might looks like this:
118
118
119
119
<programlisting>
120
- SELECT to_tsvector('public.english ', 'The blue whale is the largest animal')
121
- @@ to_tsquery('public.english ', 'large & whale');
120
+ SELECT to_tsvector('english_hunspell ', 'The blue whale is the largest animal')
121
+ @@ to_tsquery('english_hunspell ', 'large & whale');
122
122
?column?
123
123
----------
124
124
t
@@ -134,7 +134,7 @@ SELECT to_tsvector('public.english', 'The blue whale is the largest animal')
134
134
<programlisting>
135
135
CREATE TABLE table1 (t varchar);
136
136
INSERT INTO table1 VALUES ('The blue whale is the largest animal');
137
- CREATE INDEX t_idx ON table1 USING GIN (to_tsvector('public.english ', "t"));
137
+ CREATE INDEX t_idx ON table1 USING GIN (to_tsvector('english_hunspell ', "t"));
138
138
</programlisting>
139
139
140
140
</para>
@@ -143,8 +143,8 @@ CREATE INDEX t_idx ON table1 USING GIN (to_tsvector('public.english', "t"));
143
143
For this table you can execute the following query:
144
144
145
145
<programlisting>
146
- SELECT * FROM table1 where to_tsvector('public.english ', t)
147
- @@ to_tsquery('public.english ', 'blue & animal');
146
+ SELECT * FROM table1 where to_tsvector('english_hunspell ', t)
147
+ @@ to_tsquery('english_hunspell ', 'blue & animal');
148
148
t
149
149
--------------------------------------
150
150
The blue whale is the largest animal
@@ -154,4 +154,4 @@ SELECT * FROM table1 where to_tsvector('public.english', t)
154
154
</para>
155
155
</sect2>
156
156
157
- </sect1>
157
+ </sect1>