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

Commit6f932ca

Browse files
committed
Doc: remove obsolete example.
The documentation for ts_headline() recommends using a sub-select toavoid extra evaluations of ts_headline() in a query with ORDER BY+LIMIT.Since commit9118d03 this contortionism is unnecessary, so remove therecommendation. Noted by Oleg Bartunov.Discussion: <CAF4Au4w6rrH_j1bvVhzpOsRiHCog7sGJ3LSX0tY8ZdwhHT88LQ@mail.gmail.com>
1 parentcc302f3 commit6f932ca

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

‎doc/src/sgml/textsearch.sgml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,19 +1290,7 @@ query.',
12901290
<para>
12911291
<function>ts_headline</> uses the original document, not a
12921292
<type>tsvector</type> summary, so it can be slow and should be used with
1293-
care. A typical mistake is to call <function>ts_headline</function> for
1294-
<emphasis>every</emphasis> matching document when only ten documents are
1295-
to be shown. <acronym>SQL</acronym> subqueries can help; here is an
1296-
example:
1297-
1298-
<programlisting>
1299-
SELECT id, ts_headline(body, q), rank
1300-
FROM (SELECT id, body, q, ts_rank_cd(ti, q) AS rank
1301-
FROM apod, to_tsquery('stars') q
1302-
WHERE ti @@ q
1303-
ORDER BY rank DESC
1304-
LIMIT 10) AS foo;
1305-
</programlisting>
1293+
care.
13061294
</para>
13071295

13081296
</sect2>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp