Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f9e83a5

Browse files
committed
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.
1 parent 3fe2662 commit f9e83a5

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

doc/src/sgml/textsearch.sgml

+22-19
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 $ -->
22

33
<chapter id="textsearch">
44
<title id="textsearch-title">Full Text Search</title>
@@ -1040,7 +1040,7 @@ ORDER BY rank DESC LIMIT 10;
10401040

10411041
<para>
10421042
<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
10441044
the document in which terms from the query are highlighted. The
10451045
configuration to be used to parse the document can be specified by
10461046
<replaceable>config</replaceable>; if <replaceable>config</replaceable>
@@ -1094,24 +1094,27 @@ StartSel=&lt;b&gt;, StopSel=&lt;/b&gt;, MaxWords=35, MinWords=15, ShortWord=3, H
10941094
For example:
10951095

10961096
<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 &amp; term'));
1101-
ts_headline
1102-
--------------------------------------------------------------------
1103-
&lt;b&gt;ellipsis&lt;/b&gt;-separated excerpts from
1104-
the document in which &lt;b&gt;terms&lt;/b&gt; 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 &amp; 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 &amp; similarity'));
1101+
ts_headline
1102+
------------------------------------------------------------
1103+
given &lt;b&gt;query&lt;/b&gt; terms
1104+
and return them in order of their &lt;b&gt;similarity&lt;/b&gt; to the
1105+
&lt;b&gt;query&lt;/b&gt;.
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 &amp; similarity'),
11101112
'StartSel = &lt;, StopSel = &gt;');
1111-
ts_headline
1112-
---------------------------------------------------------------
1113-
&lt;ellipsis&gt;-separated excerpts from
1114-
the document in which &lt;terms&gt; from the query are highlighted.
1113+
ts_headline
1114+
-------------------------------------------------------
1115+
given &lt;query&gt; terms
1116+
and return them in order of their &lt;similarity&gt; to the
1117+
&lt;query&gt;.
11151118
</programlisting>
11161119
</para>
11171120

0 commit comments

Comments
 (0)