开发者

MySQL: Add stoplist

How could I add a own s开发者_JS百科toplist to MySQL 5?


Guessing you're asking about how to set the stopwords list for MySQL FULLTEXT search, this portion of the manual page 11.8.6. Fine-Tuning MySQL Full-Text Search could interest you (quoting) :

To override the default stopword list, set the ft_stopword_file system variable. (See Section 5.1.3, “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.

The stopword list is free-form. That is, you may use any nonalphanumeric character such as newline, space, or comma to separate stopwords.
Exceptions are the underscore character (“_”) and a single apostrophe (“'”) which are treated as part of a word. The character set of the stopword list is the server's default character set; see Section 9.1.3.1, “Server Character Set and Collation”.


It is described in the documentation.

You have to set the ft_stopword_file system variable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜