View Full Version : fulltext settings

11-20-2011, 02:17 AM
I've just started figuring out how to set up a php search that queries the database. I need to find how to change the default settings. I understand that the fulltext feature will only work on four or more characters. But it's a plant database and I have to change that to three so somebody can search for things like 'elm' or 'oak' or any other number of plants.

Also, is there a way to set exceptions for shorter items? strangely enough there's a scientific name for a plant that is just "aa." I'm sure there's other instances I'd need to enter an exception?

For reference, I'm working with MySQL 5.1 and using PHPMyAdmin

11-20-2011, 05:30 PM
You need to post the search code.

11-20-2011, 07:21 PM
You need to set the ft_min_word_len (http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_ft_min_word_len) variable in my.ini file.

ft_min_word_len=3 (or "2" if you plan to search two-letter words)

Detailed info is available here (http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html).

Hope this helps.