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ítico-militar </literal></entry>
1773+ <entry><literal>lógico-matemá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í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ísico </literal> or <literal>químico </literal>
1790- in the context <literal>físico-químico </literal></entry>
1788+ <entry><literal>lógico </literal> or <literal>matemática </literal>
1789+ in the context <literal>lógico-matemá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.