postgres.git / summary / log / commit / refs
commit 271205223a3a2f8daec73869af82753c19d46826
Author: Bruce Momjian <bruce@momjian.us>
Date: Tue Mar 04 03:17:18 2008 +0000
First released in: 8.4.0, 8.3.1
Show example of ts_headline() using a configuration name.
doc/src/sgml/textsearch.sgml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index a121741bbe2..e484ddcbdcd 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.40 2007/12/13 06:32:47 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.41 2008/03/04 03:17:18 momjian Exp $ -->
<chapter id="textsearch">
<title id="textsearch-title">Full Text Search</title>
@@ -1102,7 +1102,7 @@ StartSel=<b>, StopSel=</b>, MaxWords=35, MinWords=15, ShortWord=3, H
For example:
<programlisting>
-SELECT ts_headline('The most common type of search
+SELECT ts_headline('english', 'The most common type of search
is to find all documents containing given query terms
and return them in order of their similarity to the
query.', to_tsquery('query & similarity'));
@@ -1112,7 +1112,7 @@ query.', to_tsquery('query & similarity'));
and return them in order of their <b>similarity</b> to the
<b>query</b>.
-SELECT ts_headline('The most common type of search
+SELECT ts_headline('english', 'The most common type of search
is to find all documents containing given query terms
and return them in order of their similarity to the
query.',
@@ -1135,8 +1135,8 @@ query.',
example:
<programlisting>
-SELECT id, ts_headline(body,q), rank
-FROM (SELECT id, body, q, ts_rank_cd(ti,q) AS rank
+SELECT id, ts_headline(body, q), rank
+FROM (SELECT id, body, q, ts_rank_cd(ti, q) AS rank
FROM apod, to_tsquery('stars') q
WHERE ti @@ q
ORDER BY rank DESC LIMIT 10) AS foo;
[parent: 60c93d3976b6]