views:

127

answers:

1

Hi! I have used full text search mysql. My code is select * from uh_property WHERE match(fieldname) against('serach_word')

Now when i type word of three character search record is not displayed. For example i have record with name 'eco'. When i type eco in text box for search no record displayed.

I found that minimum character for full text search is 4. Is there anyway to solve this problem.

Thanks in advance.

+2  A: 

Please see Fine-Tuning MySQL Full-Text Search. You first need to set ft_min_word_len=3 and then rebuild the fulltext search indexes.

Yuval F
Thank you Yuval F! I checked the site before as well i can't do this for live site as the server is not for single site. Any solution for this?
I am missing something here. Could you please explain your configuration? Do you have control of the mysql server?
Yuval F
Yes I used [mysqld]ft_min_word_len=3 and it worked for local. Now I need to do this in live server. Will that affect server or create any problem? Yes i have control for mysql server for live.
I think rebuilding the indexes will probably slow down your live server. If possible, I would divert live traffic away from the server, change the variable, rebuild the index and then return the server to be live.
Yuval F
Thanks for your answer Yuval. One thing is that i could not get the my.cnf file? Could you please tell how and where to access this file in server. My server is plesk. I tried to find out how and where to get this file but did not find the solution. Yes I have come to know this file exists in /home/mydir/ or etc/my.cnf but do not know how to see these folder and the files.
Sorry, I have no experience with plesk. In a vanilla linux server, I would use something like 'locate my.cnf' to find the file. I glanced at the plesk documentation, and there seems to be some kind of administrator control panel you may use. Maybe you should post this as a separate question in ServerFault. Good luck.
Yuval F
Thanks I will try there.