List:Commits« Previous MessageNext Message »
From:paul Date:September 7 2006 6:41pm
Subject:svn commit - mysqldoc@docsrva: r3288 - in trunk: refman-4.1 refman-5.0 refman-5.1
View as plain text  
Author: paul
Date: 2006-09-07 20:41:50 +0200 (Thu, 07 Sep 2006)
New Revision: 3288

Log:
Added full-text tuning tip: How to treat hyphens as word characters. (Info
from Serg)


Modified:
   trunk/refman-4.1/functions.xml
   trunk/refman-5.0/functions.xml
   trunk/refman-5.1/functions.xml


Modified: trunk/refman-4.1/functions.xml
===================================================================
--- trunk/refman-4.1/functions.xml	2006-09-07 18:34:04 UTC (rev 3287)
+++ trunk/refman-4.1/functions.xml	2006-09-07 18:41:50 UTC (rev 3288)
Changed blocks: 1, Lines Added: 44, Lines Deleted: 0; 2020 bytes

@@ -10946,6 +10946,50 @@
           </para>
         </listitem>
 
+        <listitem>
+          <para>
+            If you want to change the set of characters that are
+            considered word characters, you can do so in two ways.
+            Suppose that you want to treat the hyphen character ('-') as
+            a word character. Use either of these methods:
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                Modify the MySQL source: In
+                <filename>myisam/ftdefs.h</filename>, see the
+                <literal>true_word_char()</literal> and
+                <literal>misc_word_char()</literal> macros.
+                Add <literal>'-'</literal> to
+                one of those macros and recompile MySQL.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                Modify a character set file: This requires no
+                recompilation. The <literal>true_word_char()</literal>
+                macro uses <literal>my_alnum()</literal>, which is
+                character set-dependent. You can edit the
+                <literal>&lt;ctype&gt;&lt;map&gt;</literal> contents in
+                one of the character set XML files to specify that
+                <literal>'-'</literal> is a <quote>letter.</quote> Then
+                use the given character set for your
+                <literal>FULLTEXT</literal> indexes.
+              </para>
+            </listitem>
+
+          </itemizedlist>
+
+          <para>
+            After making the modification, you must rebuild the indexes
+            for each table that contains any <literal>FULLTEXT</literal>
+            indexes.
+          </para>
+        </listitem>
+
       </itemizedlist>
 
       <para>


Modified: trunk/refman-5.0/functions.xml
===================================================================
--- trunk/refman-5.0/functions.xml	2006-09-07 18:34:04 UTC (rev 3287)
+++ trunk/refman-5.0/functions.xml	2006-09-07 18:41:50 UTC (rev 3288)
Changed blocks: 1, Lines Added: 44, Lines Deleted: 0; 2020 bytes

@@ -11120,6 +11120,50 @@
           </para>
         </listitem>
 
+        <listitem>
+          <para>
+            If you want to change the set of characters that are
+            considered word characters, you can do so in two ways.
+            Suppose that you want to treat the hyphen character ('-') as
+            a word character. Use either of these methods:
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                Modify the MySQL source: In
+                <filename>myisam/ftdefs.h</filename>, see the
+                <literal>true_word_char()</literal> and
+                <literal>misc_word_char()</literal> macros.
+                Add <literal>'-'</literal> to
+                one of those macros and recompile MySQL.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                Modify a character set file: This requires no
+                recompilation. The <literal>true_word_char()</literal>
+                macro uses <literal>my_alnum()</literal>, which is
+                character set-dependent. You can edit the
+                <literal>&lt;ctype&gt;&lt;map&gt;</literal> contents in
+                one of the character set XML files to specify that
+                <literal>'-'</literal> is a <quote>letter.</quote> Then
+                use the given character set for your
+                <literal>FULLTEXT</literal> indexes.
+              </para>
+            </listitem>
+
+          </itemizedlist>
+
+          <para>
+            After making the modification, you must rebuild the indexes
+            for each table that contains any <literal>FULLTEXT</literal>
+            indexes.
+          </para>
+        </listitem>
+
       </itemizedlist>
 
       <para>


Modified: trunk/refman-5.1/functions.xml
===================================================================
--- trunk/refman-5.1/functions.xml	2006-09-07 18:34:04 UTC (rev 3287)
+++ trunk/refman-5.1/functions.xml	2006-09-07 18:41:50 UTC (rev 3288)
Changed blocks: 2, Lines Added: 45, Lines Deleted: 1; 2382 bytes

@@ -11050,7 +11050,7 @@
             The 50% threshold for natural language searches is
             determined by the particular weighting scheme chosen. To
             disable it, look for the following line in
-            <filename>myisam/ftdefs.h</filename>:
+            <filename>storage/myisam/ftdefs.h</filename>:
           </para>
 
 <programlisting>

@@ -11090,6 +11090,50 @@
           </para>
         </listitem>
 
+        <listitem>
+          <para>
+            If you want to change the set of characters that are
+            considered word characters, you can do so in two ways.
+            Suppose that you want to treat the hyphen character ('-') as
+            a word character. Use either of these methods:
+          </para>
+
+          <itemizedlist>
+
+            <listitem>
+              <para>
+                Modify the MySQL source: In
+                <filename>storage/myisam/ftdefs.h</filename>, see the
+                <literal>true_word_char()</literal> and
+                <literal>misc_word_char()</literal> macros.
+                Add <literal>'-'</literal> to
+                one of those macros and recompile MySQL.
+              </para>
+            </listitem>
+
+            <listitem>
+              <para>
+                Modify a character set file: This requires no
+                recompilation. The <literal>true_word_char()</literal>
+                macro uses <literal>my_alnum()</literal>, which is
+                character set-dependent. You can edit the
+                <literal>&lt;ctype&gt;&lt;map&gt;</literal> contents in
+                one of the character set XML files to specify that
+                <literal>'-'</literal> is a <quote>letter.</quote> Then
+                use the given character set for your
+                <literal>FULLTEXT</literal> indexes.
+              </para>
+            </listitem>
+
+          </itemizedlist>
+
+          <para>
+            After making the modification, you must rebuild the indexes
+            for each table that contains any <literal>FULLTEXT</literal>
+            indexes.
+          </para>
+        </listitem>
+
       </itemizedlist>
 
       <para>


Thread
svn commit - mysqldoc@docsrva: r3288 - in trunk: refman-4.1 refman-5.0 refman-5.1paul7 Sep