From f9e83a558855e79d6f08e00e97d93e0828ad9b61 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 29 Oct 2007 01:55:11 +0000 Subject: [PATCH] Remove claim that ts_headline knows how to generate multiple ellipsis-separated excerpts of a document. That's clearly desirable, but the functionality is not there yet. --- doc/src/sgml/textsearch.sgml | 39 +++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 9cab9a4b46..9ed4b7435b 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -1,4 +1,4 @@ - + Full Text Search @@ -1040,7 +1040,7 @@ ORDER BY rank DESC LIMIT 10; ts_headline 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 config; if config @@ -1094,24 +1094,27 @@ StartSel=<b>, StopSel=</b>, MaxWords=35, MinWords=15, ShortWord=3, H For example: -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('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('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'), '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>.