Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09c29cc

Browse files
committed
Text search documentation word improvements; move configuration section
to be more logical.
1 parentbb8f629 commit09c29cc

File tree

2 files changed

+18
-37
lines changed

2 files changed

+18
-37
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.389 2007/08/2920:37:14 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.390 2007/08/2921:51:45 momjian Exp $ -->
22

33
<chapter id="functions">
44
<title>Functions and Operators</title>
@@ -7552,7 +7552,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
75527552

75537553

75547554
<sect1 id="functions-textsearch">
7555-
<title>Full Text SearchOperators andFunctions</title>
7555+
<title>Full Text SearchFunctions andOperators</title>
75567556

75577557
<para>
75587558
This section outlines all the functions and operators that are available

‎doc/src/sgml/textsearch.sgml

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ SELECT 'fat &amp; cow'::tsquery @@ 'a fat cat sat on a mat and ate a fat rat'::t
231231
is equivalent to <literal>to_tsvector(x) @@ y</literal>.
232232
The form <type>text</type> <literal>@@</literal> <type>text</type>
233233
is equivalent to <literal>to_tsvector(x) @@ plainto_tsquery(y)</literal>.
234-
<xref linkend="functions-textsearch"> contains afull list of full text
235-
searchoperators andfunctions.
234+
<xref linkend="functions-textsearch"> contains acomplete list of full text
235+
searchfunctions andoperators.
236236
</para>
237237

238238
<sect2 id="textsearch-configurations">
@@ -250,13 +250,23 @@ SELECT 'fat &amp; cow'::tsquery @@ 'a fat cat sat on a mat and ate a fat rat'::t
250250
This functionality is controlled by <emphasis>configurations</>.
251251
Fortunately, <productname>PostgreSQL</> comes with predefined
252252
configurations for many languages. (<application>psql</>'s <command>\dF</>
253-
shows all predefined configurations.) During installation an appropriate
254-
configuration was selected and <xref
255-
linkend="guc-default-text-search-config"> was set accordingly. If you
256-
need to change it, see <xref linkend="textsearch-tables-multiconfig">.
253+
shows all predefined configurations.)
254+
</para>
255+
256+
<para>
257+
During installation an appropriate configuration was selected and
258+
<xref linkend="guc-default-text-search-config"> was set accordingly
259+
in <filename>postgresql.conf</>. If you are using the same text search
260+
configuration for the entire cluster you can use the value in
261+
<filename>postgresql.conf</>. If using different configurations but
262+
the same text search configuration for an entire database,
263+
use <command>ALTER DATABASE ... SET</>. If not, you must set <xref
264+
linkend="guc-default-text-search-config"> in each session. Many
265+
functions also take an optional configuration name.
257266
</para>
258267

259268
</sect2>
269+
260270
</sect1>
261271

262272
<sect1 id="textsearch-tables">
@@ -1781,35 +1791,6 @@ SHOW default_text_search_config;
17811791

17821792
</sect2>
17831793

1784-
<sect2 id="textsearch-tables-multiconfig">
1785-
<title>Managing Multiple Configurations</title>
1786-
1787-
<para>
1788-
If you are using the same text search configuration for the entire cluster
1789-
just set the value in <filename>postgresql.conf</>. If using a single
1790-
text search configuration for an entire database, use <command>ALTER
1791-
DATABASE ... SET</>.
1792-
</para>
1793-
1794-
<para>
1795-
However, if you need to use several text search configurations in the same
1796-
database you must be careful to reference the proper text search
1797-
configuration. This can be done by either setting
1798-
<varname>default_text_search_config</> in each session or supplying the
1799-
configuration name in every function call, e.g. to_tsquery('french',
1800-
'friend'), to_tsvector('english', col). If you are using an expression
1801-
index you must embed the configuration name into the expression index, e.g.:
1802-
1803-
<programlisting>
1804-
CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector('french', title || body));
1805-
</programlisting>
1806-
1807-
And for an expression index, specify the configuration name in the
1808-
<literal>WHERE</> clause as well so the expression index will be used.
1809-
</para>
1810-
1811-
</sect2>
1812-
18131794
</sect1>
18141795

18151796
<sect1 id="textsearch-indexes">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp