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

Commit2712052

Browse files
committed
Show example of ts_headline() using a configuration name.
1 parent60c93d3 commit2712052

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎doc/src/sgml/textsearch.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.40 2007/12/13 06:32:47 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.41 2008/03/04 03:17:18 momjian Exp $ -->
22

33
<chapter id="textsearch">
44
<title id="textsearch-title">Full Text Search</title>
@@ -1102,7 +1102,7 @@ StartSel=&lt;b&gt;, StopSel=&lt;/b&gt;, MaxWords=35, MinWords=15, ShortWord=3, H
11021102
For example:
11031103

11041104
<programlisting>
1105-
SELECT ts_headline('The most common type of search
1105+
SELECT ts_headline('english', 'The most common type of search
11061106
is to find all documents containing given query terms
11071107
and return them in order of their similarity to the
11081108
query.', to_tsquery('query &amp; similarity'));
@@ -1112,7 +1112,7 @@ query.', to_tsquery('query &amp; similarity'));
11121112
and return them in order of their &lt;b&gt;similarity&lt;/b&gt; to the
11131113
&lt;b&gt;query&lt;/b&gt;.
11141114

1115-
SELECT ts_headline('The most common type of search
1115+
SELECT ts_headline('english', 'The most common type of search
11161116
is to find all documents containing given query terms
11171117
and return them in order of their similarity to the
11181118
query.',
@@ -1135,8 +1135,8 @@ query.',
11351135
example:
11361136

11371137
<programlisting>
1138-
SELECT id, ts_headline(body,q), rank
1139-
FROM (SELECT id, body, q, ts_rank_cd(ti,q) AS rank
1138+
SELECT id, ts_headline(body,q), rank
1139+
FROM (SELECT id, body, q, ts_rank_cd(ti,q) AS rank
11401140
FROM apod, to_tsquery('stars') q
11411141
WHERE ti @@ q
11421142
ORDER BY rank DESC LIMIT 10) AS foo;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp