我真的不明白,但我在MySQL中的MATCH (columnName) AGAINST ('word')
只發現那些只包含word
,但不包含words
或keyword
。MySQL - MATCH表現爲僅搜索整個單詞
我想我的系統上運行此查詢:
select count(*) from content where lcase(content_text) like '%try%'
and not match (content_text) against ('try') order by content_id
,我接收到的結果
| count(*) |
____________
| 379 |
,我相信應該是0可以去什麼錯我的查詢或數據庫?
PS:表content
是MyISAM,並且我已經設置了列全文索引的列content_text
。
我試着用其他詞,它仍然有COUNT(*)> 0 – zfm 2012-07-24 05:49:35
另外,燁你說得對,'只有MATCH'搜索整個詞。如果你想搜索單詞中的字符,使用'LIKE%XXX%'。 – uzyn 2012-07-24 05:51:12
這很糟糕,使用'LIKE%XXX%'慢得多::( – zfm 2012-07-24 05:56:39