kee2ka4 Posted August 30, 2008 Share Posted August 30, 2008 Hi, I have changed one of my table engine to ISAM from InnoDB so that I can perform full-text searching but the only issue is that any word that is too short is ignored. The default minimum length of words that are found by full-text searches is four characters. This will create a serious limitation of my application, is there any way solution to this problem. Thanks, Zub.. Quote Link to comment Share on other sites More sharing options...
fenway Posted August 30, 2008 Share Posted August 30, 2008 You can change this limit if you have control of the server.... Quote Link to comment Share on other sites More sharing options...
kee2ka4 Posted August 30, 2008 Author Share Posted August 30, 2008 Hi, thanks for your reply.. At the moment I am using local host so could you advise me on to do this. Later once the site is done, I can ask the hosting company if I can make the alteration. I have found the following instruction from the MySql site The minimum and maximum lengths of words to be indexed are defined by the ft_min_word_len and ft_max_word_len system variables. (See Section 5.1.3, “System Variables”.) The default minimum value is four characters; the default maximum is version dependent. If you change either value, you must rebuild your FULLTEXT indexes. For example, if you want three-character words to be searchable, you can set the ft_min_word_len variable by putting the following lines in an option file: [mysqld] ft_min_word_len=3 But I wanted to know were can I locate the option file from? Quote Link to comment Share on other sites More sharing options...
fenway Posted August 30, 2008 Share Posted August 30, 2008 It's called my.cnf (Linux) or my.ini (Windows), usually in the home directory (Linux) or the Windows directory. Quote Link to comment Share on other sites More sharing options...
kee2ka4 Posted August 31, 2008 Author Share Posted August 31, 2008 Hi, thanks for your msg. Since I am using the WAMP server, I did added the line, [mysqld] ft_min_word_len=3 the my.ini file. But still it doesn't pick up the 3 char word. Do you know where I might have gone wronge. Thanks, Zub Quote Link to comment Share on other sites More sharing options...
kee2ka4 Posted August 31, 2008 Author Share Posted August 31, 2008 I have figured it out how to set the minimum lenght of char's. Here is the process for setting it for everyone: 1. Add the following line to the bottom of my.ini file, [mysqld] ft_min_word_len=2 (if you are using WAMP, then you can locate this file by clicking on the wamp icon at the bottom and go to the MySQL tab and you will find the my.ini file) 2. Then restart your server 3. Go to PhpMyAdmin, and redefine your index's 4. And lastly run another SQL script that is: REPAIR TABLE tbl_name QUICK And then it will work. Thanks, Zub Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.