Skip to content

Commit baf3a13

Browse files
committed
Mention configurations early in text search documentation to table/index
section makes a little more sense.
1 parent 56cbd29 commit baf3a13

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

doc/src/sgml/textsearch.sgml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,27 @@ The form <type>text</type> <literal>@@</literal> <type>tsquery</type>
329329
is equivalent to <literal>to_tsvector(x) @@ y</literal>.
330330
The form <type>text</type> <literal>@@</literal> <type>text</type>
331331
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">.
334353
</para>
335354

336355
</sect2>
@@ -2646,15 +2665,12 @@ database you must be careful to reference the proper text search
26462665
configuration. This can be done by either setting
26472666
<varname>default_text_search_config</> in each session or supplying the
26482667
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.:
26542670
<programlisting>
26552671
CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector('french', title || body));
26562672
</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
26582674
<literal>WHERE</> clause as well so the expression index will be used.
26592675
</para>
26602676

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy