-<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.28 2007/10/27 16:01:08 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.29 2007/10/29 01:55:11 tgl Exp $ -->
<chapter id="textsearch">
<title id="textsearch-title">Full Text Search</title>
<para>
<function>ts_headline</function> accepts a document along
- with a query, and returns one or more ellipsis-separated excerpts from
+ with a query, and returns an excerpt from
the document in which terms from the query are highlighted. The
configuration to be used to parse the document can be specified by
<replaceable>config</replaceable>; if <replaceable>config</replaceable>
For example:
<programlisting>
-SELECT ts_headline('ts_headline accepts a document along
-with a query, and returns one or more ellipsis-separated excerpts from
-the document in which terms from the query are highlighted.',
- to_tsquery('ellipsis & term'));
- ts_headline
---------------------------------------------------------------------
- <b>ellipsis</b>-separated excerpts from
- the document in which <b>terms</b> from the query are highlighted.
-
-SELECT ts_headline('ts_headline accepts a document along
-with a query, and returns one or more ellipsis-separated excerpts from
-the document in which terms from the query are highlighted.',
- to_tsquery('ellipsis & term'),
+SELECT ts_headline('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'));
+ ts_headline
+------------------------------------------------------------
+ given <b>query</b> terms
+ and return them in order of their <b>similarity</b> to the
+ <b>query</b>.
+
+SELECT ts_headline('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'),
'StartSel = <, StopSel = >');
- ts_headline
----------------------------------------------------------------
- <ellipsis>-separated excerpts from
- the document in which <terms> from the query are highlighted.
+ ts_headline
+-------------------------------------------------------
+ given <query> terms
+ and return them in order of their <similarity> to the
+ <query>.
</programlisting>
</para>