From 2a0083ede88d278922fcfddeaf60d84a7cff6a5c Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Fri, 17 Oct 2008 18:05:19 +0000 Subject: Improve headeline generation. Now headline can contain several fragments a-la Google. Sushant Sinha --- doc/src/sgml/textsearch.sgml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 45a9f5a389f..ac8b75512e0 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -1,4 +1,4 @@ - + Full Text Search @@ -1098,6 +1098,29 @@ ORDER BY rank DESC LIMIT 10; value of three eliminates the English articles. + + + MaxFragments: maximum number of text excerpts + or fragments that matches the query words. It also triggers a + different headline generation function than the default one. This + function finds text fragments with as many query words as possible and + stretches those fragments around the query words. As a result + query words are close to the middle of each fragment and have words on + each side. Each fragment will be of at most MaxWords and will not + have words of size less than or equal to ShortWord at the start or + end of a fragment. If all query words are not found in the document, + then a single fragment of MinWords will be displayed. + + + + + FragmentDelimiter: When more than one fragments are + displayed, then the fragments will be separated by this delimiter. This + option is effective only if MaxFragments is greater than 1 and there are + more than one fragments to be diplayed. This option has no effect on the + default headline generation function. + + HighlightAll: Boolean flag; if @@ -1109,7 +1132,7 @@ ORDER BY rank DESC LIMIT 10; Any unspecified options receive these defaults: -StartSel=<b>, StopSel=</b>, MaxWords=35, MinWords=15, ShortWord=3, HighlightAll=FALSE +StartSel=<b>, StopSel=</b>, MaxFragments=0, FragmentDelimiter=" ... ", MaxWords=35, MinWords=15, ShortWord=3, HighlightAll=FALSE -- cgit v1.2.3