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

Commit 2aac6f1

Browse files
committed
Minor wording improvements per suggestion from Jeff Davis. Also tweak
hyphenated-word parser examples per earlier discussion with Alvaro.
1 parent 8a8bcb4 commit 2aac6f1

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

doc/src/sgml/textsearch.sgml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.26 2007/10/25 13:06:35 alvherre Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/textsearch.sgml,v 1.27 2007/10/27 00:19:45 tgl Exp $ -->
22

33
<chapter id="textsearch">
44
<title id="textsearch-title">Full Text Search</title>
@@ -1770,7 +1770,7 @@ LIMIT 10;
17701770
<row>
17711771
<entry><literal>hword</></entry>
17721772
<entry>Hyphenated word, all letters</entry>
1773-
<entry><literal>pol&iacute;tico-militar</literal></entry>
1773+
<entry><literal>l&oacute;gico-matem&aacute;tica</literal></entry>
17741774
</row>
17751775
<row>
17761776
<entry><literal>numhword</></entry>
@@ -1780,14 +1780,13 @@ LIMIT 10;
17801780
<row>
17811781
<entry><literal>hword_asciipart</></entry>
17821782
<entry>Hyphenated word part, all ASCII</entry>
1783-
<entry><literal>militar</literal> in the context
1784-
<literal>pol&iacute;tico-militar</literal>, or <literal>postgresql</literal> in the context <literal>postgresql-beta1</literal></entry>
1783+
<entry><literal>postgresql</literal> in the context <literal>postgresql-beta1</literal></entry>
17851784
</row>
17861785
<row>
17871786
<entry><literal>hword_part</></entry>
17881787
<entry>Hyphenated word part, all letters</entry>
1789-
<entry><literal>f&iacute;sico</literal> or <literal>qu&iacute;mico</literal>
1790-
in the context <literal>f&iacute;sico-qu&iacute;mico</literal></entry>
1788+
<entry><literal>l&oacute;gico</literal> or <literal>matem&aacute;tica</literal>
1789+
in the context <literal>l&oacute;gico-matem&aacute;tica</literal></entry>
17911790
</row>
17921791
<row>
17931792
<entry><literal>hword_numpart</></entry>
@@ -1902,12 +1901,12 @@ SELECT alias, description, token FROM ts_debug('foo-bar-beta1');
19021901
instructive example:
19031902

19041903
<programlisting>
1905-
SELECT alias, description, token FROM ts_debug('http://foo.com/stuff/index.html');
1906-
alias | description | token
1907-
----------+---------------+--------------------------
1904+
SELECT alias, description, token FROM ts_debug('http://example.com/stuff/index.html');
1905+
alias | description | token
1906+
----------+---------------+------------------------------
19081907
protocol | Protocol head | http://
1909-
url | URL | foo.com/stuff/index.html
1910-
host | Host | foo.com
1908+
url | URL | example.com/stuff/index.html
1909+
host | Host | example.com
19111910
uri | URI | /stuff/index.html
19121911
</programlisting>
19131912
</para>
@@ -3093,8 +3092,9 @@ SELECT plainto_tsquery('supernovae stars');
30933092
</para>
30943093

30953094
<para>
3096-
A GiST index is <firstterm>lossy</firstterm>, meaning it is necessary
3097-
to check the actual table row to eliminate false matches.
3095+
A GiST index is <firstterm>lossy</firstterm>, meaning that the index
3096+
may produce false matches, and it is necessary
3097+
to check the actual table row to eliminate such false matches.
30983098
<productname>PostgreSQL</productname> does this automatically; for
30993099
example, in the query plan below, the <literal>Filter:</literal>
31003100
line indicates the index output will be rechecked:
@@ -3112,14 +3112,15 @@ EXPLAIN SELECT * FROM apod WHERE textsearch @@ to_tsquery('supernovae');
31123112
index by a fixed-length signature. The signature is generated by hashing
31133113
each word into a random bit in an n-bit string, with all these bits OR-ed
31143114
together to produce an n-bit document signature. When two words hash to
3115-
the same bit position there will be a false match, and if all words in
3115+
the same bit position there will be a false match. If all words in
31163116
the query have matches (real or false) then the table row must be
31173117
retrieved to see if the match is correct.
31183118
</para>
31193119

31203120
<para>
3121-
Lossiness causes performance degradation since random access to table
3122-
records is slow; this limits the usefulness of GiST indexes. The
3121+
Lossiness causes performance degradation due to useless fetches of table
3122+
records that turn out to be false matches. Since random access to table
3123+
records is slow, this limits the usefulness of GiST indexes. The
31233124
likelihood of false matches depends on several factors, in particular the
31243125
number of unique words, so using dictionaries to reduce this number is
31253126
recommended.

0 commit comments

Comments
 (0)