Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 99a01bf

Browse files
committed
In text search docs, properly use indexterm _zone_ only when we want an
entire section, per Peter.
1 parent 6e832b0 commit 99a01bf

File tree

3 files changed

+87
-91
lines changed

3 files changed

+87
-91
lines changed

doc/src/sgml/datatype.sgml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.208 2007/08/29 20:37:14 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.209 2007/08/31 04:52:29 momjian Exp $ -->
22

33
<chapter id="datatype">
44
<title id="datatype-title">Data Types</title>
@@ -3281,20 +3281,18 @@ a0eebc999c0b4ef8bb6d6bb9bd380a11
32813281

32823282
<variablelist>
32833283

3284-
<indexterm zone="datatype-textsearch">
3285-
<primary>tsvector</primary>
3286-
</indexterm>
3287-
32883284
<varlistentry>
32893285
<term><firstterm>tsvector</firstterm></term>
32903286
<listitem>
32913287

32923288
<para>
3293-
<type>tsvector</type> is a data type that represents a document and is
3294-
optimized for full text searching. In the simplest case,
3295-
<type>tsvector</type> is a sorted list of lexemes, so even without indexes
3296-
full text searches perform better than standard <literal>~</literal> and
3297-
<literal>LIKE</literal> operations:
3289+
<type>tsvector</type>
3290+
<indexterm><primary>tsvector</primary></indexterm> is a data type
3291+
that represents a document and is optimized for full text searching.
3292+
In the simplest case, <type>tsvector</type> is a sorted list of
3293+
lexemes, so even without indexes full text searches perform better
3294+
than standard <literal>~</literal> and <literal>LIKE</literal>
3295+
operations:
32983296

32993297
<programlisting>
33003298
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;
33553353

33563354
</varlistentry>
33573355

3358-
<indexterm zone="datatype-textsearch">
3359-
<primary>tsquery</primary>
3360-
</indexterm>
3361-
33623356
<varlistentry>
33633357
<term><firstterm>tsquery</firstterm></term>
33643358
<listitem>
33653359

33663360
<para>
3367-
<type>tsquery</type> is a data type for textual queries which supports
3368-
the boolean operators <literal>&amp;</literal> (AND), <literal>|</literal> (OR),
3369-
and parentheses. A <type>tsquery</type> consists of lexemes
3370-
(optionally labeled by letters) with boolean operators in between:
3361+
<type>tsquery</type>
3362+
<indexterm><primary>tsquery</primary></indexterm> is a data type
3363+
for textual queries which supports the boolean operators
3364+
<literal>&amp;</literal> (AND), <literal>|</literal> (OR), and
3365+
parentheses. A <type>tsquery</type> consists of lexemes (optionally
3366+
labeled by letters) with boolean operators in between:
33713367

33723368
<programlisting>
33733369
SELECT 'fat &amp; cat'::tsquery;

doc/src/sgml/func.sgml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.390 2007/08/29 21:51:45 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.391 2007/08/31 04:52:29 momjian Exp $ -->
22

33
<chapter id="functions">
44
<title>Functions and Operators</title>
@@ -7585,8 +7585,8 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
75857585

75867586
<varlistentry>
75877587

7588-
<indexterm zone="functions-textsearch-search-operator">
7589-
<primary>TSVECTOR @@ TSQUERY</primary>
7588+
<indexterm>
7589+
<primary>TSVECTOR @@ TSQUERY</primary>
75907590
</indexterm>
75917591

75927592
<term>
@@ -7620,8 +7620,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector @@ 'fat &amp; cow'::
76207620

76217621
<varlistentry>
76227622

7623-
<indexterm zone="functions-textsearch-search-operator">
7624-
<primary>TEXT @@ TSQUERY</primary>
7623+
<indexterm>
7624+
<primary>TEXT @@ TSQUERY</primary>
76257625
</indexterm>
76267626

76277627
<term>
@@ -7652,8 +7652,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::text @@ 'cat &amp; cow'::tsqu
76527652

76537653
<varlistentry>
76547654

7655-
<indexterm zone="functions-textsearch-search-operator">
7656-
<primary>TEXT @@ TEXT</primary>
7655+
<indexterm>
7656+
<primary>TEXT @@ TEXT</primary>
76577657
</indexterm>
76587658

76597659
<term>
@@ -7701,8 +7701,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
77017701

77027702
<varlistentry>
77037703

7704-
<indexterm zone="functions-textsearch-tsvector">
7705-
<primary>to_tsvector</primary>
7704+
<indexterm>
7705+
<primary>to_tsvector</primary>
77067706
</indexterm>
77077707

77087708
<term>
@@ -7723,8 +7723,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
77237723

77247724
<varlistentry>
77257725

7726-
<indexterm zone="functions-textsearch-tsvector">
7727-
<primary>strip</primary>
7726+
<indexterm>
7727+
<primary>strip</primary>
77287728
</indexterm>
77297729

77307730
<term>
@@ -7746,8 +7746,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
77467746

77477747
<varlistentry>
77487748

7749-
<indexterm zone="functions-textsearch-tsvector">
7750-
<primary>setweight</primary>
7749+
<indexterm>
7750+
<primary>setweight</primary>
77517751
</indexterm>
77527752

77537753
<term>
@@ -7771,8 +7771,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
77717771

77727772
<varlistentry>
77737773

7774-
<indexterm zone="functions-textsearch-tsvector">
7775-
<primary>tsvector concatenation</primary>
7774+
<indexterm>
7775+
<primary>tsvector concatenation</primary>
77767776
</indexterm>
77777777

77787778
<term>
@@ -7802,8 +7802,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
78027802

78037803

78047804
<varlistentry>
7805-
<indexterm zone="functions-textsearch-tsvector">
7806-
<primary>length(tsvector)</primary>
7805+
<indexterm>
7806+
<primary>length(tsvector)</primary>
78077807
</indexterm>
78087808

78097809
<term>
@@ -7821,8 +7821,8 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
78217821

78227822
<varlistentry>
78237823

7824-
<indexterm zone="functions-textsearch-tsvector">
7825-
<primary>text::tsvector</primary>
7824+
<indexterm>
7825+
<primary>text::tsvector</primary>
78267826
</indexterm>
78277827

78287828
<term>
@@ -7846,9 +7846,9 @@ SELECT 'a fat cat sat on a mat and ate a fat rat' @@ 'cat cow';
78467846

78477847
<varlistentry>
78487848

7849-
<indexterm zone="functions-textsearch-tsvector">
7850-
<primary>trigger</primary>
7851-
<secondary>for updating a derived tsvector column</secondary>
7849+
<indexterm>
7850+
<primary>trigger</primary>
7851+
<secondary>for updating a derived tsvector column</secondary>
78527852
</indexterm>
78537853

78547854
<term>
@@ -7896,8 +7896,8 @@ tsvector_update_trigger(tsv, 'pg_catalog.english', strMessage);
78967896

78977897
<varlistentry>
78987898

7899-
<indexterm zone="functions-textsearch-tsvector">
7900-
<primary>ts_stat</primary>
7899+
<indexterm>
7900+
<primary>ts_stat</primary>
79017901
</indexterm>
79027902

79037903
<term>
@@ -7943,8 +7943,8 @@ LIMIT 10;
79437943

79447944
<varlistentry>
79457945

7946-
<indexterm zone="functions-textsearch-tsvector">
7947-
<primary>Btree operations for tsvector</primary>
7946+
<indexterm>
7947+
<primary>Btree operations for tsvector</primary>
79487948
</indexterm>
79497949

79507950
<term>
@@ -7979,8 +7979,8 @@ LIMIT 10;
79797979

79807980
<varlistentry>
79817981

7982-
<indexterm zone="functions-textsearch-tsquery">
7983-
<primary>to_tsquery</primary>
7982+
<indexterm>
7983+
<primary>to_tsquery</primary>
79847984
</indexterm>
79857985

79867986
<term>
@@ -8026,8 +8026,8 @@ SELECT to_tsquery('''supernovae stars'' &amp; !crab');
80268026

80278027
<varlistentry>
80288028

8029-
<indexterm zone="functions-textsearch-tsquery">
8030-
<primary>plainto_tsquery</primary>
8029+
<indexterm>
8030+
<primary>plainto_tsquery</primary>
80318031
</indexterm>
80328032

80338033
<term>
@@ -8051,8 +8051,8 @@ SELECT to_tsquery('''supernovae stars'' &amp; !crab');
80518051

80528052
<varlistentry>
80538053

8054-
<indexterm zone="functions-textsearch-tsquery">
8055-
<primary>querytree</primary>
8054+
<indexterm>
8055+
<primary>querytree</primary>
80568056
</indexterm>
80578057

80588058
<term>
@@ -8081,8 +8081,8 @@ SELECT querytree(to_tsquery('!defined'));
80818081

80828082
<varlistentry>
80838083

8084-
<indexterm zone="functions-textsearch-tsquery">
8085-
<primary>text::tsquery casting</primary>
8084+
<indexterm>
8085+
<primary>text::tsquery casting</primary>
80868086
</indexterm>
80878087

80888088
<term>
@@ -8107,8 +8107,8 @@ SELECT querytree(to_tsquery('!defined'));
81078107

81088108
<varlistentry>
81098109

8110-
<indexterm zone="functions-textsearch-tsquery">
8111-
<primary>numnode</primary>
8110+
<indexterm>
8111+
<primary>numnode</primary>
81128112
</indexterm>
81138113

81148114
<term>
@@ -8146,8 +8146,8 @@ SELECT numnode(plainto_tsquery('long table'));
81468146

81478147
<varlistentry>
81488148

8149-
<indexterm zone="functions-textsearch-tsquery">
8150-
<primary>TSQUERY &amp;&amp; TSQUERY</primary>
8149+
<indexterm>
8150+
<primary>TSQUERY &amp;&amp; TSQUERY</primary>
81518151
</indexterm>
81528152

81538153
<term>
@@ -8165,8 +8165,8 @@ SELECT numnode(plainto_tsquery('long table'));
81658165

81668166
<varlistentry>
81678167

8168-
<indexterm zone="functions-textsearch-tsquery">
8169-
<primary>TSQUERY || TSQUERY</primary>
8168+
<indexterm>
8169+
<primary>TSQUERY || TSQUERY</primary>
81708170
</indexterm>
81718171

81728172
<term>
@@ -8184,8 +8184,8 @@ SELECT numnode(plainto_tsquery('long table'));
81848184

81858185
<varlistentry>
81868186

8187-
<indexterm zone="functions-textsearch-tsquery">
8188-
<primary>!! TSQUERY</primary>
8187+
<indexterm>
8188+
<primary>!! TSQUERY</primary>
81898189
</indexterm>
81908190

81918191
<term>
@@ -8203,8 +8203,8 @@ SELECT numnode(plainto_tsquery('long table'));
82038203

82048204
<varlistentry>
82058205

8206-
<indexterm zone="functions-textsearch-tsquery">
8207-
<primary>Btree operations for tsquery</primary>
8206+
<indexterm>
8207+
<primary>Btree operations for tsquery</primary>
82088208
</indexterm>
82098209

82108210
<term>
@@ -8257,8 +8257,8 @@ INSERT INTO aliases VALUES('a', 'c');
82578257

82588258
<varlistentry>
82598259

8260-
<indexterm zone="functions-textsearch-tsquery">
8261-
<primary>ts_rewrite</primary>
8260+
<indexterm>
8261+
<primary>ts_rewrite</primary>
82628262
</indexterm>
82638263

82648264
<term>
@@ -8404,8 +8404,8 @@ WHERE 'a &amp; b' @> t;
84048404

84058405
<varlistentry>
84068406

8407-
<indexterm zone="functions-textsearch-tsquery">
8408-
<primary>TSQUERY @&gt; TSQUERY</primary>
8407+
<indexterm>
8408+
<primary>TSQUERY @&gt; TSQUERY</primary>
84098409
</indexterm>
84108410

84118411
<term>
@@ -8423,8 +8423,8 @@ WHERE 'a &amp; b' @> t;
84238423

84248424
<varlistentry>
84258425

8426-
<indexterm zone="functions-textsearch-tsquery">
8427-
<primary>tsquery &lt;@ tsquery</primary>
8426+
<indexterm>
8427+
<primary>tsquery &lt;@ tsquery</primary>
84288428
</indexterm>
84298429

84308430
<term>

0 commit comments

Comments
 (0)