No results after removing mysql ft_stopword_file

隐身守侯 提交于 2019-12-01 19:35:27

Setting stopwords.txt variable to the empty string ('') disables all stopword filtering. (Remove some words which you don't require...suggestion..)

Indexes of FULL TEXT SEARCH which was created by you needs to be destroy and create new one.

FULLTEXT indexes must be rebuilt after changing this variable or the contents of the stopword file.

Then Use REPAIR TABLE tbl_name QUICK.

InnoDB doesn't support table repairs (you can see a note when you do REPAIR TABLE tbl_name QUICK.)

The only solution that I have dound is to change the engine to MyISAM, although that might decrease READ or WRITE performance.

How to disable fulltext stopwords in MySQL:

In my.ini text file (MySQL) :

ft_stopword_file = ""   or link an empty file "empty_stopwords.txt"
ft_min_word_len = 2 

// set your minimum length, but be aware that shorter words (3,2) will increase the query time dramatically, especially if the fulltext indexed column fields are large.

Save the file, restart the server.

The next step should be to repair the indexes with this query:

REPAIR TABLE tbl_name QUICK.

However, this will not work if you table is using InnoDB storage engine. You will have to change it to MyISAM :

ALTER TABLE t1 ENGINE = MyISAM;

So, once again:

1. Edit my.ini file and save
2. Restart your server (this cannot be done dynamically)
3. Change the table engine (if needed)  ALTER TABLE tbl_name ENGINE = MyISAM;
4. Perform repair                       REPAIR TABLE tbl_name QUICK.

Be aware that InnoDB and MyISAM have their speed differences. One read faster, other writes faster ( read more about that on the internet )

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