|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.28 2007/10/27 16:01:08 tgl Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.29 2007/10/29 01:55:11 tgl Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="textsearch">
|
4 | 4 | <title id="textsearch-title">Full Text Search</title>
|
@@ -1040,7 +1040,7 @@ ORDER BY rank DESC LIMIT 10;
|
1040 | 1040 |
|
1041 | 1041 | <para>
|
1042 | 1042 | <function>ts_headline</function> accepts a document along
|
1043 |
| - with a query, and returns one or more ellipsis-separated excerpts from |
| 1043 | + with a query, and returns an excerpt from |
1044 | 1044 | the document in which terms from the query are highlighted. The
|
1045 | 1045 | configuration to be used to parse the document can be specified by
|
1046 | 1046 | <replaceable>config</replaceable>; if <replaceable>config</replaceable>
|
@@ -1094,24 +1094,27 @@ StartSel=<b>, StopSel=</b>, MaxWords=35, MinWords=15, ShortWord=3, H
|
1094 | 1094 | For example:
|
1095 | 1095 |
|
1096 | 1096 | <programlisting>
|
1097 |
| -SELECT ts_headline('ts_headline accepts a document along |
1098 |
| -with a query, and returns one or more ellipsis-separated excerpts from |
1099 |
| -the document in which terms from the query are highlighted.', |
1100 |
| - to_tsquery('ellipsis & term')); |
1101 |
| - ts_headline |
1102 |
| --------------------------------------------------------------------- |
1103 |
| - <b>ellipsis</b>-separated excerpts from |
1104 |
| - the document in which <b>terms</b> from the query are highlighted. |
1105 |
| - |
1106 |
| -SELECT ts_headline('ts_headline accepts a document along |
1107 |
| -with a query, and returns one or more ellipsis-separated excerpts from |
1108 |
| -the document in which terms from the query are highlighted.', |
1109 |
| - to_tsquery('ellipsis & term'), |
| 1097 | +SELECT ts_headline('The most common type of search |
| 1098 | +is to find all documents containing given query terms |
| 1099 | +and return them in order of their similarity to the |
| 1100 | +query.', to_tsquery('query & similarity')); |
| 1101 | + ts_headline |
| 1102 | +------------------------------------------------------------ |
| 1103 | + given <b>query</b> terms |
| 1104 | + and return them in order of their <b>similarity</b> to the |
| 1105 | + <b>query</b>. |
| 1106 | + |
| 1107 | +SELECT ts_headline('The most common type of search |
| 1108 | +is to find all documents containing given query terms |
| 1109 | +and return them in order of their similarity to the |
| 1110 | +query.', |
| 1111 | + to_tsquery('query & similarity'), |
1110 | 1112 | 'StartSel = <, StopSel = >');
|
1111 |
| - ts_headline |
1112 |
| ---------------------------------------------------------------- |
1113 |
| - <ellipsis>-separated excerpts from |
1114 |
| - the document in which <terms> from the query are highlighted. |
| 1113 | + ts_headline |
| 1114 | +------------------------------------------------------- |
| 1115 | + given <query> terms |
| 1116 | + and return them in order of their <similarity> to the |
| 1117 | + <query>. |
1115 | 1118 | </programlisting>
|
1116 | 1119 | </para>
|
1117 | 1120 |
|
|
0 commit comments