Link to home
Start Free TrialLog in
Avatar of XK8ER
XK8ERFlag for United States of America

asked on

min word len

hello there,
I would like to search for two letter words using mysql and someone said to use ft_min_word_len
I read this but still not sure http://dev.mysql.com/doc/refman/5.1/en/fulltext-fine-tuning.html
how exactly do I do that?
ASKER CERTIFIED SOLUTION
Avatar of theGhost_k8
theGhost_k8
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of XK8ER

ASKER

I added this ft_min_word_len=2
into my my.cnf file and then restarted the mysqld service then from phpmyadmin in variables i see this ft min word len 4
I hope you don't already have that variable set to 4 in my.cnf. If so than just update the value to 2.
Avatar of XK8ER

ASKER

this is what i get when i try to connect to mysql

-(10:06 38 AM)-(root@dedicated)-(~) $ mysql -u root -p --password=temp123
mysql: unknown variable 'ft_min_word_len=2'
-(10:08 09 AM)-(root@dedicated)-(~) $
Avatar of XK8ER

ASKER

this is what I get when I try to set the global

mysql> SET GLOBAL ft_min_word_len=2;
ERROR 1193 (HY000): Unknown system variable 'ft_min_word_len'
mysql>
Avatar of XK8ER

ASKER

mysql> SHOW VARIABLES LIKE 'ft_min%';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| ft_min_word_len | 4     |
+-----------------+-------+
1 row in set (0.00 sec)
Avatar of XK8ER

ASKER

theGhost_k8, thats exactly what I did!
yep ! by bad at step 2.. we can't directly change fulltext parameters.
http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html
Avatar of XK8ER

ASKER

same link i posted