Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
bda9dc7e
Commit
bda9dc7e
authored
16 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Do some copy-editing on description of ts_headline().
parent
14a4f6f3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/textsearch.sgml
+32
-26
32 additions, 26 deletions
doc/src/sgml/textsearch.sgml
with
32 additions
and
26 deletions
doc/src/sgml/textsearch.sgml
+
32
−
26
View file @
bda9dc7e
<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.4
8
2009/0
3/2
4
2
0:
17:08
tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.4
9
2009/0
4/1
4
0
0:
49:56
tgl Exp $ -->
<chapter id="textsearch">
<chapter id="textsearch">
<title id="textsearch-title">Full Text Search</title>
<title id="textsearch-title">Full Text Search</title>
...
@@ -1082,7 +1082,8 @@ ORDER BY rank DESC LIMIT 10;
...
@@ -1082,7 +1082,8 @@ ORDER BY rank DESC LIMIT 10;
<para>
<para>
<literal>StartSel</>, <literal>StopSel</literal>: the strings with which
<literal>StartSel</>, <literal>StopSel</literal>: the strings with which
query words appearing in the document should be delimited to distinguish
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.
</para>
</para>
</listitem>
</listitem>
<listitem >
<listitem >
...
@@ -1095,36 +1096,36 @@ ORDER BY rank DESC LIMIT 10;
...
@@ -1095,36 +1096,36 @@ ORDER BY rank DESC LIMIT 10;
<para>
<para>
<literal>ShortWord</literal>: words of this length or less will be
<literal>ShortWord</literal>: words of this length or less will be
dropped at the start and end of a headline. The default
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.
</para>
</para>
</listitem>
</listitem>
<listitem>
<listitem>
<para>
<para>
<literal>MaxFragments</literal>: maximum number of text excerpts
<literal>HighlightAll</literal>: Boolean flag; if
or fragments that matches the query words. It also triggers a
<literal>true</literal> the whole document will be used as the
different headline generation function than the default one. This
headline, ignoring the preceding three parameters.
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.
</para>
</para>
</listitem>
</listitem>
<listitem>
<listitem>
<para>
<para>
<literal>FragmentDelimiter</literal>: When more than one fragments are
<literal>MaxFragments</literal>: maximum number of text excerpts
displayed, then the fragments will be separated by this delimiter. This
or fragments to display. The default value of zero selects a
option is effective only if MaxFragments is greater than 1 and there are
non-fragment-oriented headline generation method. A value greater than
more than one fragments to be diplayed. This option has no effect on the
zero selects fragment-based headline generation. This method
default headline generation 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 <literal>MaxWords</> and
words of length <literal>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 <literal>MinWords</>
in the document will be displayed.
</para>
</para>
</listitem>
</listitem>
<listitem>
<listitem>
<para>
<para>
<literal>
HighlightAll</literal>: Boolean flag;
i
f
<literal>
FragmentDelimiter</literal>: When more than one fragment
i
s
<literal>true</literal> the whole docu
ment will be
highlighted
.
displayed, the frag
ment
s
will be
separated by this string
.
</para>
</para>
</listitem>
</listitem>
</itemizedlist>
</itemizedlist>
...
@@ -1132,7 +1133,9 @@ ORDER BY rank DESC LIMIT 10;
...
@@ -1132,7 +1133,9 @@ ORDER BY rank DESC LIMIT 10;
Any unspecified options receive these defaults:
Any unspecified options receive these defaults:
<programlisting>
<programlisting>
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=" ... "
</programlisting>
</programlisting>
</para>
</para>
...
@@ -1140,17 +1143,20 @@ StartSel=<b>, StopSel=</b>, MaxFragments=0, FragmentDelimiter=" ...
...
@@ -1140,17 +1143,20 @@ StartSel=<b>, StopSel=</b>, MaxFragments=0, FragmentDelimiter=" ...
For example:
For example:
<programlisting>
<programlisting>
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
is to find all documents containing given query terms
and return them in order of their similarity to the
and return them in order of their similarity to the
query.', to_tsquery('query & similarity'));
query.',
to_tsquery('query & similarity'));
ts_headline
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
and return them in order of their <b>similarity</b> to the
<b>query</b>.
<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
is to find all documents containing given query terms
and return them in order of their similarity to the
and return them in order of their similarity to the
query.',
query.',
...
@@ -1158,7 +1164,7 @@ query.',
...
@@ -1158,7 +1164,7 @@ query.',
'StartSel = <, StopSel = >');
'StartSel = <, StopSel = >');
ts_headline
ts_headline
-------------------------------------------------------
-------------------------------------------------------
given <query> terms
containing
given <query> terms
and return them in order of their <similarity> to the
and return them in order of their <similarity> to the
<query>.
<query>.
</programlisting>
</programlisting>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment