你试图匹配3个字符串,而默认值是4(我想这也是你的情况) .
它在MySQL文档的_835335页面上说:
Any word that is too short is ignored. The default minimum length of words that are found by full-text searches is four characters.
检查this以进行微调全文搜索:
For example, if you want three-character words to be searchable,
you can set the ft_min_word_len variable by putting the following
lines in an option file:
[mysqld]
ft_min_word_len=3
UPDATE:
来自MySQL文档:
A phrase that is enclosed within double quote (“"”)
characters matches only rows that contain the
phrase literally, as it was typed.
The full-text engine splits the phrase into words
and performs a search in the FULLTEXT index for the words.
Nonword characters need not be matched exactly:
Phrase searching requires only that matches contain exactly
the same words as the phrase and in the same order.
For example, "test phrase" matches "test, phrase".
这基本上意味着你可以尝试用双引号括起搜索短语的全文搜索,只要美元符号是你的列值中唯一的美元和价格之间的特殊字符(它们之间也没有空格),你就可以获得所需的结果 . 但是,FULLTEXT搜索用于单词搜索,并且忽略特殊字符,因此依赖于此非常危险 .
如果数据库中的更改不可能,您可以考虑使用SPHINX进行全文搜索 .