How can I write full search index query which will not consider any stopwords?

巧了我就是萌 提交于 2019-12-24 16:18:49

问题


I have written a query which will perform Full Text search using full search Index in mysql Table.

But my problem is that when user searches with "to go" then it will not search anything because of stopwords in mysql.

So my question is, how can I write a Full Search query which will ignore the stopwords?


回答1:


To override the default stopword list, set the ft_stopword_file system variable. (See Section 5.1.4, “Server System Variables”.) The variable value should be the path name of the file containing the stopword list, or the empty string to disable stopword filtering. The server looks for the file in the data directory unless an absolute path name is given to specify a different directory. After changing the value of this variable or the contents of the stopword file, restart the server and rebuild your FULLTEXT indexes.

http://dev.mysql.com/doc/refman/5.1/en/fulltext-fine-tuning.html



来源:https://stackoverflow.com/questions/2839135/how-can-i-write-full-search-index-query-which-will-not-consider-any-stopwords

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