Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
99a01bfd
Commit
99a01bfd
authored
Aug 31, 2007
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In text search docs, properly use indexterm _zone_ only when we want an
entire section, per Peter.
parent
6e832b05
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
91 deletions
+87
-91
doc/src/sgml/datatype.sgml
doc/src/sgml/datatype.sgml
+14
-18
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+50
-50
doc/src/sgml/textsearch.sgml
doc/src/sgml/textsearch.sgml
+23
-23
No files found.
doc/src/sgml/datatype.sgml
View file @
99a01bfd
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.20
8 2007/08/29 20:37:14
momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.20
9 2007/08/31 04:52:29
momjian Exp $ -->
<chapter id="datatype">
<chapter id="datatype">
<title id="datatype-title">Data Types</title>
<title id="datatype-title">Data Types</title>
...
@@ -3281,20 +3281,18 @@ a0eebc999c0b4ef8bb6d6bb9bd380a11
...
@@ -3281,20 +3281,18 @@ a0eebc999c0b4ef8bb6d6bb9bd380a11
<variablelist>
<variablelist>
<indexterm zone="datatype-textsearch">
<primary>tsvector</primary>
</indexterm>
<varlistentry>
<varlistentry>
<term><firstterm>tsvector</firstterm></term>
<term><firstterm>tsvector</firstterm></term>
<listitem>
<listitem>
<para>
<para>
<type>tsvector</type> is a data type that represents a document and is
<type>tsvector</type>
optimized for full text searching. In the simplest case,
<indexterm><primary>tsvector</primary></indexterm> is a data type
<type>tsvector</type> is a sorted list of lexemes, so even without indexes
that represents a document and is optimized for full text searching.
full text searches perform better than standard <literal>~</literal> and
In the simplest case, <type>tsvector</type> is a sorted list of
<literal>LIKE</literal> operations:
lexemes, so even without indexes full text searches perform better
than standard <literal>~</literal> and <literal>LIKE</literal>
operations:
<programlisting>
<programlisting>
SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector;
SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector;
...
@@ -3355,19 +3353,17 @@ SELECT 'fat:1 rat:2'::tsvector || 'fat:1 cat:2'::tsvector;
...
@@ -3355,19 +3353,17 @@ SELECT 'fat:1 rat:2'::tsvector || 'fat:1 cat:2'::tsvector;
</varlistentry>
</varlistentry>
<indexterm zone="datatype-textsearch">
<primary>tsquery</primary>
</indexterm>
<varlistentry>
<varlistentry>
<term><firstterm>tsquery</firstterm></term>
<term><firstterm>tsquery</firstterm></term>
<listitem>
<listitem>
<para>
<para>
<type>tsquery</type> is a data type for textual queries which supports
<type>tsquery</type>
the boolean operators <literal>&</literal> (AND), <literal>|</literal> (OR),
<indexterm><primary>tsquery</primary></indexterm> is a data type
and parentheses. A <type>tsquery</type> consists of lexemes
for textual queries which supports the boolean operators
(optionally labeled by letters) with boolean operators in between:
<literal>&</literal> (AND), <literal>|</literal> (OR), and
parentheses. A <type>tsquery</type> consists of lexemes (optionally
labeled by letters) with boolean operators in between:
<programlisting>
<programlisting>
SELECT 'fat & cat'::tsquery;
SELECT 'fat & cat'::tsquery;
...
...
doc/src/sgml/func.sgml
View file @
99a01bfd
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.39
0 2007/08/29 21:51:45
momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.39
1 2007/08/31 04:52:29
momjian Exp $ -->
<chapter
id=
"functions"
>
<chapter
id=
"functions"
>
<title>
Functions and Operators
</title>
<title>
Functions and Operators
</title>
...
@@ -7585,8 +7585,8 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
...
@@ -7585,8 +7585,8 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-search-operator"
>
<indexterm>
<primary>
TSVECTOR @@ TSQUERY
</primary>
<primary>
TSVECTOR @@ TSQUERY
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7620,8 +7620,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector @@ 'fat & cow'::
...
@@ -7620,8 +7620,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector @@ 'fat & cow'::
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-search-operator"
>
<indexterm>
<primary>
TEXT @@ TSQUERY
</primary>
<primary>
TEXT @@ TSQUERY
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7652,8 +7652,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::text @@ 'cat & cow'::tsqu
...
@@ -7652,8 +7652,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::text @@ 'cat & cow'::tsqu
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-search-operator"
>
<indexterm>
<primary>
TEXT @@ TEXT
</primary>
<primary>
TEXT @@ TEXT
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7701,8 +7701,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
...
@@ -7701,8 +7701,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsvector"
>
<indexterm>
<primary>
to_tsvector
</primary>
<primary>
to_tsvector
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7723,8 +7723,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
...
@@ -7723,8 +7723,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsvector"
>
<indexterm>
<primary>
strip
</primary>
<primary>
strip
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7746,8 +7746,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
...
@@ -7746,8 +7746,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsvector"
>
<indexterm>
<primary>
setweight
</primary>
<primary>
setweight
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7771,8 +7771,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
...
@@ -7771,8 +7771,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsvector"
>
<indexterm>
<primary>
tsvector concatenation
</primary>
<primary>
tsvector concatenation
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7802,8 +7802,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
...
@@ -7802,8 +7802,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsvector"
>
<indexterm>
<primary>
length(tsvector)
</primary>
<primary>
length(tsvector)
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7821,8 +7821,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
...
@@ -7821,8 +7821,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsvector"
>
<indexterm>
<primary>
text::tsvector
</primary>
<primary>
text::tsvector
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7846,9 +7846,9 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
...
@@ -7846,9 +7846,9 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsvector"
>
<indexterm>
<primary>
trigger
</primary>
<primary>
trigger
</primary>
<secondary>
for updating a derived tsvector column
</secondary>
<secondary>
for updating a derived tsvector column
</secondary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7896,8 +7896,8 @@ tsvector_update_trigger(tsv, 'pg_catalog.english', strMessage);
...
@@ -7896,8 +7896,8 @@ tsvector_update_trigger(tsv, 'pg_catalog.english', strMessage);
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsvector"
>
<indexterm>
<primary>
ts_stat
</primary>
<primary>
ts_stat
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7943,8 +7943,8 @@ LIMIT 10;
...
@@ -7943,8 +7943,8 @@ LIMIT 10;
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsvector"
>
<indexterm>
<primary>
Btree operations for tsvector
</primary>
<primary>
Btree operations for tsvector
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -7979,8 +7979,8 @@ LIMIT 10;
...
@@ -7979,8 +7979,8 @@ LIMIT 10;
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
to_tsquery
</primary>
<primary>
to_tsquery
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8026,8 +8026,8 @@ SELECT to_tsquery('''supernovae stars'' & !crab');
...
@@ -8026,8 +8026,8 @@ SELECT to_tsquery('''supernovae stars'' & !crab');
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
plainto_tsquery
</primary>
<primary>
plainto_tsquery
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8051,8 +8051,8 @@ SELECT to_tsquery('''supernovae stars'' & !crab');
...
@@ -8051,8 +8051,8 @@ SELECT to_tsquery('''supernovae stars'' & !crab');
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
querytree
</primary>
<primary>
querytree
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8081,8 +8081,8 @@ SELECT querytree(to_tsquery('!defined'));
...
@@ -8081,8 +8081,8 @@ SELECT querytree(to_tsquery('!defined'));
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
text::tsquery casting
</primary>
<primary>
text::tsquery casting
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8107,8 +8107,8 @@ SELECT querytree(to_tsquery('!defined'));
...
@@ -8107,8 +8107,8 @@ SELECT querytree(to_tsquery('!defined'));
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
numnode
</primary>
<primary>
numnode
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8146,8 +8146,8 @@ SELECT numnode(plainto_tsquery('long table'));
...
@@ -8146,8 +8146,8 @@ SELECT numnode(plainto_tsquery('long table'));
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
TSQUERY
&&
TSQUERY
</primary>
<primary>
TSQUERY
&&
TSQUERY
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8165,8 +8165,8 @@ SELECT numnode(plainto_tsquery('long table'));
...
@@ -8165,8 +8165,8 @@ SELECT numnode(plainto_tsquery('long table'));
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
TSQUERY || TSQUERY
</primary>
<primary>
TSQUERY || TSQUERY
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8184,8 +8184,8 @@ SELECT numnode(plainto_tsquery('long table'));
...
@@ -8184,8 +8184,8 @@ SELECT numnode(plainto_tsquery('long table'));
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
!! TSQUERY
</primary>
<primary>
!! TSQUERY
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8203,8 +8203,8 @@ SELECT numnode(plainto_tsquery('long table'));
...
@@ -8203,8 +8203,8 @@ SELECT numnode(plainto_tsquery('long table'));
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
Btree operations for tsquery
</primary>
<primary>
Btree operations for tsquery
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8257,8 +8257,8 @@ INSERT INTO aliases VALUES('a', 'c');
...
@@ -8257,8 +8257,8 @@ INSERT INTO aliases VALUES('a', 'c');
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
ts_rewrite
</primary>
<primary>
ts_rewrite
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8404,8 +8404,8 @@ WHERE 'a & b' @> t;
...
@@ -8404,8 +8404,8 @@ WHERE 'a & b' @> t;
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
TSQUERY @
>
TSQUERY
</primary>
<primary>
TSQUERY @
>
TSQUERY
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -8423,8 +8423,8 @@ WHERE 'a & b' @> t;
...
@@ -8423,8 +8423,8 @@ WHERE 'a & b' @> t;
<varlistentry>
<varlistentry>
<indexterm
zone=
"functions-textsearch-tsquery"
>
<indexterm>
<primary>
tsquery
<
@ tsquery
</primary>
<primary>
tsquery
<
@ tsquery
</primary>
</indexterm>
</indexterm>
<term>
<term>
...
...
doc/src/sgml/textsearch.sgml
View file @
99a01bfd
...
@@ -241,8 +241,8 @@ SELECT 'fat & cow'::tsquery @@ 'a fat cat sat on a mat and ate a fat rat'::t
...
@@ -241,8 +241,8 @@ SELECT 'fat & cow'::tsquery @@ 'a fat cat sat on a mat and ate a fat rat'::t
<title>Configurations</title>
<title>Configurations</title>
<indexterm zone="textsearch-configurations">
<indexterm zone="textsearch-configurations">
<primary>text search</primary>
<primary>text search</primary>
<secondary>configurations</secondary>
<secondary>configurations</secondary>
</indexterm>
</indexterm>
<para>
<para>
...
@@ -429,6 +429,11 @@ ORDER BY rank DESC LIMIT 10;
...
@@ -429,6 +429,11 @@ ORDER BY rank DESC LIMIT 10;
<sect2 id="textsearch-parser">
<sect2 id="textsearch-parser">
<title>Parsing</title>
<title>Parsing</title>
<indexterm zone="textsearch-parser">
<primary>text search</primary>
<secondary>parse</secondary>
</indexterm>
<para>
<para>
Full text searching in <productname>PostgreSQL</productname> provides
Full text searching in <productname>PostgreSQL</productname> provides
function <function>to_tsvector</function>, which converts a document to
function <function>to_tsvector</function>, which converts a document to
...
@@ -544,11 +549,6 @@ UPDATE tt SET ti=
...
@@ -544,11 +549,6 @@ UPDATE tt SET ti=
<varlistentry>
<varlistentry>
<indexterm zone="textsearch-parser">
<primary>text search</primary>
<secondary>parse</secondary>
</indexterm>
<term>
<term>
<synopsis>
<synopsis>
ts_parse(<replaceable class="PARAMETER">parser</replaceable>, <replaceable class="PARAMETER">document</replaceable> TEXT) returns SETOF <type>tokenout</type>
ts_parse(<replaceable class="PARAMETER">parser</replaceable>, <replaceable class="PARAMETER">document</replaceable> TEXT) returns SETOF <type>tokenout</type>
...
@@ -579,8 +579,8 @@ SELECT * FROM ts_parse('default','123 - a number');
...
@@ -579,8 +579,8 @@ SELECT * FROM ts_parse('default','123 - a number');
<varlistentry>
<varlistentry>
<indexterm zone="textsearch-parser">
<indexterm zone="textsearch-parser">
<primary>text search</primary>
<primary>text search</primary>
<secondary>ts_token_type</secondary>
<secondary>ts_token_type</secondary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -667,8 +667,8 @@ SELECT * FROM ts_token_type('default');
...
@@ -667,8 +667,8 @@ SELECT * FROM ts_token_type('default');
<varlistentry>
<varlistentry>
<indexterm zone="textsearch-ranking">
<indexterm zone="textsearch-ranking">
<primary>text search</primary>
<primary>text search</primary>
<secondary>ts_rank</secondary>
<secondary>ts_rank</secondary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -704,8 +704,8 @@ SELECT * FROM ts_token_type('default');
...
@@ -704,8 +704,8 @@ SELECT * FROM ts_token_type('default');
<varlistentry>
<varlistentry>
<indexterm zone="textsearch-ranking">
<indexterm zone="textsearch-ranking">
<primary>text search</primary>
<primary>text search</primary>
<secondary>ts_rank_cd</secondary>
<secondary>ts_rank_cd</secondary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -855,8 +855,8 @@ ORDER BY rnk DESC LIMIT 10;
...
@@ -855,8 +855,8 @@ ORDER BY rnk DESC LIMIT 10;
<title>Highlighting Results</title>
<title>Highlighting Results</title>
<indexterm zone="textsearch-headline">
<indexterm zone="textsearch-headline">
<primary>text search</primary>
<primary>text search</primary>
<secondary>headline</secondary>
<secondary>headline</secondary>
</indexterm>
</indexterm>
<para>
<para>
...
@@ -1576,8 +1576,8 @@ CREATE TEXT SEARCH DICTIONARY english_stem (
...
@@ -1576,8 +1576,8 @@ CREATE TEXT SEARCH DICTIONARY english_stem (
<varlistentry>
<varlistentry>
<indexterm zone="textsearch-dictionaries">
<indexterm zone="textsearch-dictionaries">
<primary>text search</primary>
<primary>text search</primary>
<secondary>ts_lexize</secondary>
<secondary>ts_lexize</secondary>
</indexterm>
</indexterm>
<term>
<term>
...
@@ -1821,13 +1821,13 @@ SHOW default_text_search_config;
...
@@ -1821,13 +1821,13 @@ SHOW default_text_search_config;
<varlistentry>
<varlistentry>
<indexterm zone="textsearch-indexes">
<indexterm zone="textsearch-indexes">
<primary>text search</primary>
<primary>text search</primary>
<secondary>GiST</secondary>
<secondary>GiST</secondary>
</indexterm>
</indexterm>
<!--
<!--
<indexterm zone="textsearch-indexes">
<indexterm zone="textsearch-indexes">
<primary>GiST</primary>
<primary>GiST</primary>
</indexterm>
</indexterm>
-->
-->
<term>
<term>
...
@@ -1848,13 +1848,13 @@ SHOW default_text_search_config;
...
@@ -1848,13 +1848,13 @@ SHOW default_text_search_config;
<varlistentry>
<varlistentry>
<indexterm zone="textsearch-indexes">
<indexterm zone="textsearch-indexes">
<primary>text search</primary>
<primary>text search</primary>
<secondary>GIN</secondary>
<secondary>GIN</secondary>
</indexterm>
</indexterm>
<!--
<!--
<indexterm zone="textsearch-indexes">
<indexterm zone="textsearch-indexes">
<primary>GIN</primary>
<primary>GIN</primary>
</indexterm>
</indexterm>
-->
-->
<term>
<term>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment