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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.