Oracle 5.0 Reference Manual page 965

Table of Contents

Advertisement

• The minimum and maximum lengths of words to be indexed are defined by the
ft_min_word_len
"Server System
Variables".) The default minimum value is four characters; the default
maximum is version dependent. If you change either value, you must rebuild your
indexes. For example, if you want three-character words to be searchable, you can set the
ft_min_word_len
[mysqld]
ft_min_word_len=3
Then restart the server and rebuild your
in the instructions following this list.
myisamchk
To override the default stopword list, set the
Section 5.1.4, "Server System
containing the stopword list, or the empty string to disable stopword filtering. The server looks for the
file in the data directory unless an absolute path name is given to specify a different directory. After
changing the value of this variable or the contents of the stopword file, restart the server and rebuild
your
indexes.
FULLTEXT
The stopword list is free-form. That is, you may use any nonalphanumeric character such as newline,
space, or comma to separate stopwords. Exceptions are the underscore character ("_") and a single
apostrophe ("'") which are treated as part of a word. The character set of the stopword list is the
server's default character set; see
• The 50% threshold for natural language searches is determined by the particular weighting scheme
chosen. To disable it, look for the following line in myisam/ftdefs.h:
#define GWS_IN_USE GWS_PROB
Change that line to this:
#define GWS_IN_USE GWS_FREQ
Then recompile MySQL. There is no need to rebuild the indexes in this case.
Note
By making this change, you severely decrease MySQL's ability to provide
adequate relevance values for the
need to search for such common words, it would be better to search using
BOOLEAN MODE
• To change the operators used for boolean full-text searches, set the
system variable. This variable can be changed while the server is running, but you must have the
[578]
privilege to do so. No rebuilding of indexes is necessary in this case. See
SUPER
"Server System
Variables", which describes the rules governing how to set this variable.
• If you want to change the set of characters that are considered word characters, you can do so in
several ways, as described in the following list. After making the modification, you must rebuild the
indexes for each table that contains any
hyphen character ('-') as a word character. Use one of these methods:
• Modify the MySQL source: In myisam/ftdefs.h, see the
misc_word_char()
• Modify a character set file: This requires no recompilation. The
a "character type" table to distinguish letters and numbers from other characters. . You can edit the
contents of the
<ctype><map>
a "letter." Then use the given character set for your
array format, see
<ctype><map>
Fine-Tuning MySQL Full-Text Search
[452]
and
ft_max_word_len
[452]
variable by putting the following lines in an option file:
FULLTEXT
Variables".) The variable value should be the path name of the file
Section 10.1.3.1, "Server Character Set and
instead, which does not observe the 50% threshold.
FULLTEXT
macros. Add
to one of those macros and recompile MySQL.
'-'
array in one of the character set XML files to specify that
Section 10.3.1, "Character Definition
945
[452]
system variables. (See
indexes. Note particularly the remarks regarding
[453]
ft_stopword_file
[934]
MATCH()
ft_boolean_syntax
indexes. Suppose that you want to treat the
true_word_char()
true_word_char()
indexes. For information about the
FULLTEXT
Section 5.1.4,
FULLTEXT
system variable. (See
Collation".
function. If you really
[451]
Section 5.1.4,
and
macro uses
'-'
Arrays".
IN
is

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents