使用非常简单的 MySQL 语句进行全文搜索
我最近遇到了 MySQL 全文搜索的一个奇怪问题。我的声明非常简单:
SELECT * FROM `mytable` WHERE MATCH (`desc`) AGAINST ('+NOR +710' IN BOOLEAN MODE)
这就是 desc
列中的内容:“NOR 710 也有烟封...”
由于某种原因,它找不到该行。我向该列添加了全文索引,mysql版本是 5.1.56 ,该表的数据库引擎是 MyISAM。还有什么我需要检查的吗?
谢谢
I recently came across a wierd issue with MySQL Fulltext search. My statement is really simple:
SELECT * FROM `mytable` WHERE MATCH (`desc`) AGAINST ('+NOR +710' IN BOOLEAN MODE)
And this is what in the desc
column: "The NOR 710 also has smoke seal ..."
For some reason it won't find that row. I added Fulltext index to that column, mysql version is 5.1.56 , database engine of that table is MyISAM. Is there anything else i need to check?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,全文索引将忽略少于 4 个字符的单词。调整您的
ft_min_word_len
以包含较短的单词。By default, fulltext indexes will ignore words that are shorter than 4 charaters. Adjust your
ft_min_word_len
to also include the shorter words.