我想禁用全文索引的停止字。数据库在mysql 5.6上运行innodb。
我只想禁用一张桌子。我找到了innodb_ft_user_stopword_表的mysql文档,但是我不知道如何使索引使用这个表。我假设我可以简单地创建一个空表来禁用这个特性。
全文索引目前存在,并尊重词尾。
我想这个过程应该是这样的:
创建空的stopword表
如何将索引指向新的stopword表
重新构建索引(或者删除并重新创建,在这种情况下,请在此处执行步骤2)
谢谢你抽出时间来读这个。
最佳答案
为了澄清BK435的答案,您没有将表设置为innodb_ft_enable_stopword变量,而是将其启用,然后将其设置为innodb_ft_server_stopword_table或innodb_ft_user_stopword_table:
innodb_ft_enable_stopword=1
innodb_ft_server_stopword_table=db_name/table_name
innodb_ft_user_stopword_table=db_name/table_name
对于用户stopword表,我在文档中没有看到您指定要影响的表。。。它说这是每一个表,但没有具体说明如何做。。。
我在这篇文章中写了更多的细节:
MySQL 5.6 Full Text Search Issue when Searching for the word "the" in PHP
关于mysql - 为表禁用mysql innodb停用词,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29977727/