match() against() 不起作用,但就像 '%$s%'做
我的表中有一个全文字段。其中一行是:
"this is the dog that ran over there"
我有以下 mysql 语句:
SELECT *
FROM `table`
WHERE MATCH (column) AGAINST ('dog that ran')
...返回 0 条记录
SELECT *
FROM `table`
WHERE `column` LIKE '%dog that ran%'
...返回 1 条记录
为什么有差异?他们都应该返回 1 条记录,对吗?
I have a fulltext field in my table. One of the rows is:
"this is the dog that ran over there"
I have the following mysql statements:
SELECT *
FROM `table`
WHERE MATCH (column) AGAINST ('dog that ran')
...returns 0 records
SELECT *
FROM `table`
WHERE `column` LIKE '%dog that ran%'
...returns 1 record
Why the difference? They should both return 1 record, right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从我的对另一个问题的回答:
全文搜索有一些奇怪的怪癖。
例如, this 的最后段落中描述的行为页面可能是您的问题的原因:
这里的答案是添加更多行,或使用布尔搜索。
From my answer to another question:
Fulltext search has some bizarre quirks.
For example, the behaviour described in the last paragraphs of this page could be the reason for your problem:
The answer here would be to add more rows, or use boolean search.