Jump to content

How Do I Change Minimum Word Size (Match/Against)


Steve Henry

Recommended Posts

You have stop the server. Then...

On [b]Linux[/b] you need to find the file [b]my.cnf[/b]. On Windows you need to find the file [b]my.ini[/b]! Then below the mysql options group...

[code][mysqld][/code]


You add the variable=value that you want to set the minimum word length to search. So if you want to search words (3 character) or greater, your added mysql configuration file line would be...

[code][mysqld]
ft_min_word_len=3[/code]


If you have some special words you don't ever want to be searched, (included in the index) you would create a file of those words and add (1) word per line!

// mysql_stop.txt

[code]became
because
become
becomes
becoming
been
before
beforehand
began
begin
beginning
begins
begun
behalf
behind
being
below
beside
besides
between
beyond
both[/code]

Then place that file some where on your system. Then add the variable=value that points to that file.

// windows use full path c:/path/stop.txt

[code][mysqld]
ft_min_word_len=3
ft_stopword_file=/path/mysql_stop.txt[/code]


After you have done that, use the [b]MySQL Query Browser[/b] or some other script based MySQL access application, like [b]phpMyAdmin[/b]. In [b]phpMyAdmin[/b] click on the [b]pencil (edit)[/b] under [b]Indexes[/b] where each column is listed as FULLTEXT, you will see that below the table structure! [b]Modify an index[/b], opens, just click the button (save), the reindexing will begin! You can also just delete the FULLTEXT index clicking on the [X] image in the Indexes list, then in the structure table display, click on the last image icon that has a [T] in the image, for the column you want to add the FULLTEXT index to, click it, and the indexing will begin! But don't add a index to any column you are not using!


Simple stuff...

Sonia

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.