mysql 匹配/反对 [英] mysql match/against
问题描述
我正在使用此搜索
-> 匹配 (c1, c2) 对 (">dg*" 布尔模式);
-> match (c1, c2) against (">dg*" in boolean mode);
我得到了这个列表
1 dgas
2 dgica
3 dgicb
4 dgii
5 dgit
6 dgly
7 dgc
8 dgse
这似乎是合理的.
问题是我没有得到dgl",我知道它在 c1 列中.
The problem is that I DON'T get "dgl", which I know is there in column c1.
所以我确实得到了dgly"而不是dgl".
So I DO get "dgly" but NOT "dgl".
我觉得这很令人困惑,如果您有任何想法,我将不胜感激.谢谢.
I find this confusing and would appreciate any thoughts. Thanks.
推荐答案
默认情况下,MySQL 全文索引将忽略少于四个字符的单词.
MySQL fulltext indexing will, by default, ignore words that are shorter than four characters.
这可以在服务器级别通过设置ft_min_word_len
到一个较小的数字,然后重建全文索引.
This can be changed at the server level by setting ft_min_word_len
to a smaller number and then rebuilding the fulltext indexes.
这篇关于mysql 匹配/反对的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!