1- <!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.45 2008/09/23 09:20:34 heikki Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.46 2008/10/17 18:05:19 teodor Exp $ -->
22
33<chapter id="textsearch">
44 <title id="textsearch-title">Full Text Search</title>
@@ -1098,6 +1098,29 @@ ORDER BY rank DESC LIMIT 10;
10981098 value of three eliminates the English articles.
10991099 </para>
11001100 </listitem>
1101+ <listitem>
1102+ <para>
1103+ <literal>MaxFragments</literal>: maximum number of text excerpts
1104+ or fragments that matches the query words. It also triggers a
1105+ different headline generation function than the default one. This
1106+ function finds text fragments with as many query words as possible and
1107+ stretches those fragments around the query words. As a result
1108+ query words are close to the middle of each fragment and have words on
1109+ each side. Each fragment will be of at most MaxWords and will not
1110+ have words of size less than or equal to ShortWord at the start or
1111+ end of a fragment. If all query words are not found in the document,
1112+ then a single fragment of MinWords will be displayed.
1113+ </para>
1114+ </listitem>
1115+ <listitem>
1116+ <para>
1117+ <literal>FragmentDelimiter</literal>: When more than one fragments are
1118+ displayed, then the fragments will be separated by this delimiter. This
1119+ option is effective only if MaxFragments is greater than 1 and there are
1120+ more than one fragments to be diplayed. This option has no effect on the
1121+ default headline generation function.
1122+ </para>
1123+ </listitem>
11011124 <listitem>
11021125 <para>
11031126 <literal>HighlightAll</literal>: Boolean flag; if
@@ -1109,7 +1132,7 @@ ORDER BY rank DESC LIMIT 10;
11091132 Any unspecified options receive these defaults:
11101133
11111134<programlisting>
1112- StartSel=<b>, StopSel=</b>, MaxWords=35, MinWords=15, ShortWord=3, HighlightAll=FALSE
1135+ StartSel=<b>, StopSel=</b>, MaxFragments=0, FragmentDelimiter=" ... ", MaxWords=35, MinWords=15, ShortWord=3, HighlightAll=FALSE
11131136</programlisting>
11141137 </para>
11151138
0 commit comments