-
+
Full Text Search
StartSel>, StopSel: the strings with which
query words appearing in the document should be delimited to distinguish
- them from other excerpted words.
+ them from other excerpted words. You must double-quote these strings
+ if they contain spaces or commas.
ShortWord: words of this length or less will be
dropped at the start and end of a headline. The default
- value of three eliminates the English articles.
+ value of three eliminates common 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.
+ HighlightAll: Boolean flag; if
+ true the whole document will be used as the
+ headline, ignoring the preceding three parameters.
- 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.
+ MaxFragments: maximum number of text excerpts
+ or fragments to display. The default value of zero selects a
+ non-fragment-oriented headline generation method. A value greater than
+ zero selects fragment-based headline generation. This method
+ 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
+ words of length ShortWord> or less are dropped at the start
+ and end of each fragment. If not all query words are found in the
+ document, then a single fragment of the first MinWords>
+ in the document will be displayed.
- HighlightAll: Boolean flag; if
- true the whole document will be highlighted.
+ FragmentDelimiter: When more than one fragment is
+ displayed, the fragments will be separated by this string.
Any unspecified options receive these defaults:
-StartSel=<b>, StopSel=</b>, MaxFragments=0, FragmentDelimiter=" ... ", MaxWords=35, MinWords=15, ShortWord=3, HighlightAll=FALSE
+StartSel=<b>, StopSel=</b>,
+MaxWords=35, MinWords=15, ShortWord=3, HighlightAll=FALSE,
+MaxFragments=0, FragmentDelimiter=" ... "
For example:
-SELECT ts_headline('english', 'The most common type of search
+SELECT ts_headline('english',
+ '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'));
+query.',
+ to_tsquery('query & similarity'));
ts_headline
------------------------------------------------------------
- given <b>query</b> terms
+ containing given <b>query</b> terms
and return them in order of their <b>similarity</b> to the
<b>query</b>.
-SELECT ts_headline('english', 'The most common type of search
+SELECT ts_headline('english',
+ '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.',
'StartSel = <, StopSel = >');
ts_headline
-------------------------------------------------------
- given <query> terms
+ containing given <query> terms
and return them in order of their <similarity> to the
<query>.