mysql match/against

北城余情 提交于 2019-12-24 00:00:03

问题


I'm using this search

-> match (c1, c2) against (">dg*" in boolean mode);

and I get this list

1 dgas

2 dgica

3 dgicb

4 dgii

5 dgit

6 dgly

7 dgc

8 dgse

which seems reasonable.

The problem is that I DON'T get "dgl", which I know is there in column c1.

So I DO get "dgly" but NOT "dgl".

I find this confusing and would appreciate any thoughts. Thanks.


回答1:


MySQL fulltext indexing will, by default, ignore words that are shorter than four characters.

This can be changed at the server level by setting ft_min_word_len to a smaller number and then rebuilding the fulltext indexes.

Here's more information in the manual about fine-tuning fulltext searches.



来源:https://stackoverflow.com/questions/5366840/mysql-match-against

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