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!
FULLTEXT stopword problem
Moderator: General Moderators
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL
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).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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL
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
Manual page: http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.