dpw70180 2012-06-03 17:45
浏览 48

为什么FullText搜索找不到它?

I need a search engine which works on MySql database, And I have FULLTEXT index on the columns, but for some reason - Sometimes he finds what I ask him for and sometimes he doesn't - And I really don't understand why.

For instance, I have in my MyIsam songs table a name column which indexed FULLTEXT.

And I have these records:

Sweet child o' mine , Don't Cry

And when I do this query:

$query = $msi->query("SELECT `name` FROM songs WHERE MATCH(`name`) AGAINST ('Mine') ");
while($fetch = $query->fetch_assoc())
echo $fetch['name']."<br />";

It finds it.

But when I do this:

$query = $msi->query("SELECT `name` FROM songs WHERE MATCH(`name`) AGAINST ('Dont') "); // or 'don\'t' , 'dont cry' , 'Don\'t Cry' , etc..
while($fetch = $query->fetch_assoc())
echo $fetch['name']."<br />";

It doesn't.

And I really don't understand why.. Another example is that I have another artist column on the same table which has a record - 'Sia'. And even when I do the query to find 'Sia' , it doesn't work!! Can someone explain me why?? (it's not the because of the min length - I use in_boolean_mode)

By the way, I use wampserver, so I thought that it might have something to do with that their MySql is not updated to the last version of it or something like that..

Please Help! I'm desperate.. :(

  • 写回答

1条回答 默认 最新

  • dongqie4402 2012-06-03 17:52
    关注

    Dont is a stop word

    You should edit the stop word lists

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度