@@ -329,8 +329,27 @@ The form <type>text</type> <literal>@@</literal> <type>tsquery</type>
329
329
is equivalent to <literal>to_tsvector(x) @@ y</literal>.
330
330
The form <type>text</type> <literal>@@</literal> <type>text</type>
331
331
is equivalent to <literal>to_tsvector(x) @@ plainto_tsquery(y)</literal>.
332
- Note that the results of these forms will depend on the setting of <xref
333
- linkend="guc-default-text-search-config">.
332
+ </para>
333
+
334
+ <sect2 id="textsearch-configurations">
335
+ <title>Configurations</title>
336
+
337
+ <indexterm zone="textsearch-configurations">
338
+ <primary>configurations</primary>
339
+ </indexterm>
340
+
341
+ <para>
342
+ The above are all simple text search examples. As mentioned before, full
343
+ text search functionality includes the ability to do many more things:
344
+ skip indexing certain words (stop words), process synonyms, and use
345
+ sophisticated parsing, e.g. parse based on more than just white space.
346
+ This functionality is controlled by <emphasis>configurations</>.
347
+ Fortunately, <productname>PostgreSQL</> comes with predefined
348
+ configurations for many languages. (<application>psql</>'s <command>\dF</>
349
+ shows all predefined configurations.) During installation an appropriate
350
+ configuration was selected and <xref
351
+ linkend="guc-default-text-search-config"> was set accordingly. If you
352
+ need to change it, see <xref linkend="textsearch-tables-multiconfig">.
334
353
</para>
335
354
336
355
</sect2>
@@ -2646,15 +2665,12 @@ database you must be careful to reference the proper text search
2646
2665
configuration. This can be done by either setting
2647
2666
<varname>default_text_search_config</> in each session or supplying the
2648
2667
configuration name in every function call, e.g. to_tsquery('french',
2649
- 'friend'), to_tsvector('english', col). If you are using an expression index,
2650
- you must also be sure to use the proper text search configuration every
2651
- time an <command>INSERT</> or <command>UPDATE</> is executed because these
2652
- will modify the index, or you can embed the configuration name into the
2653
- expression index, e.g.:
2668
+ 'friend'), to_tsvector('english', col). If you are using an expression
2669
+ index you must embed the configuration name into the expression index, e.g.:
2654
2670
<programlisting>
2655
2671
CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector('french', title || body));
2656
2672
</programlisting>
2657
- And if you do that, make sure you specify the configuration name in the
2673
+ And for an expression index, specify the configuration name in the
2658
2674
<literal>WHERE</> clause as well so the expression index will be used.
2659
2675
</para>
2660
2676
0 commit comments