Skip to content

Commit 6f932ca

Browse files
committed
Doc: remove obsolete example.
The documentation for ts_headline() recommends using a sub-select to avoid extra evaluations of ts_headline() in a query with ORDER BY+LIMIT. Since commit 9118d03 this contortionism is unnecessary, so remove the recommendation. Noted by Oleg Bartunov. Discussion: <CAF4Au4w6rrH_j1bvVhzpOsRiHCog7sGJ3LSX0tY8ZdwhHT88LQ@mail.gmail.com>
1 parent cc302f3 commit 6f932ca

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)
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