Page 1 of 1

FULLTEXT stopword problem

Posted: Wed Nov 23, 2005 2:23 pm
by seodevhead
Hey guys... happy thanksgiving!

I have a column in a table I want my visitors to perform fulltext searches on, however the contents of this column are model numbers like so:

Lp-233 Gold
Tz-100 Silver
Ma-100 Gold
Pe-500 Platinum


Most of my visitors will probably just want to search 'Lp-233' for example. The problem is '-' (hyphen) is a FULLTEXT stopword and because of this, no results are being returned. Is there a way to make '-' (hyphen) not a stopword?? Thanks for your help! Take care and happy holidays!

Posted: Wed Nov 23, 2005 3:14 pm
by pickle
MySQL Manual wrote:To override the default stopword list, set the ft_stopword_file system variable. (See Section 5.3.3, “Server System Variables”.) The variable value should be the pathname of the file containing the stopword list, or the empty string to disable stopword filtering. After changing the value of this variable or the contents of the stopword file, rebuild your FULLTEXT indexes.
I believe this will also work if you do what they say, but put it in your my.cnf file (on my systems that's stored in /etc/my.cnf which is the default).

Posted: Wed Nov 23, 2005 3:41 pm
by seodevhead
Hey... I'll take a look into that. Is there anything I can do just in my php scripting to cure this? THanks for your help.

Posted: Wed Nov 23, 2005 5:23 pm
by pickle
Not that I know of. The documentation mentions the method of starting the mysql daemon with certain flags. Nowhere did I see comments about changing that directive at runtime.

Manual page: http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html

Posted: Tue Nov 29, 2005 6:24 am
by pedrokas
advise your users about the exception! and give then the solution!
"Lp-233" Gold
"Tz-100" Silver
"Ma-100" Gold
the engine uses the Word "Lp-233" to do the search!

in my intranet this how i did it!