1
我搜索了很多,據說我必須編輯my.cnf文件來更改停用詞列表。 我將my-medium.cnf重命名爲my.cnf,並添加了ft_query_expansion_limit和ft_stopword_file條件。我重新啓動了mySQL。但它沒有生效。我沒有管理員權限。mysql修改全文搜索的停用詞列表
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
ft_query_expansion_limit = 10
ft_stopword_file = 'D:/mysql/stopword.txt'
mysql> show variables like '%ft%';
+--------------------------+----------------+
| Variable_name | Value |
+--------------------------+----------------+
| ft_boolean_syntax | + -><()~*:""&| |
| ft_max_word_len | 84 |
| ft_min_word_len | 4 |
| ft_query_expansion_limit | 20 |
| ft_stopword_file | (built-in) |
+--------------------------+----------------+
5 rows in set (0.00 sec)
我能做些什麼來修改停止字?
您也可以使用REGEXP命令來匹配表中的搜索項 – Ghostman