Stopwords and MySQL boolean fulltext

送分小仙女□ 提交于 2019-12-04 10:07:23
Auden

I had this issue and did a google search coming across this post (over a year later) I am on a shared host as well and was pulling my hair out over the stop words set in mysql. I found a workaround that has been working perfectly for me, hopefully it can be of some use to others as well.

You can also use the REGEXP command to match a search term within your table.

SELECT * FROM table WHERE column REGEXP 'searchterm'

How I implement it is by first doing the MATCH AGAINST syntax, if the count = 0 I do the REGEXP instead giving my users more results. Better than no results at all due to stop words and minimum lengths.

Forget it, the change of mysql full-text setting require a restart
details - http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

note that Dynamic column is marked as NO for ft_stopword_file

However, is no harm to check with your hosting service provider...

If it do restart for you, you can use the following to repair your table full-text

mysql> REPAIR TABLE tbl_name QUICK;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!