开发者

MySQL - Fulltext Index Search Issue

开发者 https://www.devze.com 2022-12-25 08:16 出处:网络
Two rows in the my database have the following data: brand| product| style =================================================

Two rows in the my database have the following data:

brand       | product                     | style
=================================================
Doc Martens | Doc Martens 1460 Boots开发者_开发知识库      | NULL
NewBalance  | New Balance WR1062 SG Width | NULL

Mininum word length is set to 3, and a FULLTEXT index is created across all the three columns above.

When I run a search for IS BOOLEAN matches for +doc in the index, I get the first row returned as a result. When I search for +new, I get no results.

Can someone explain why?

Thanks.


It called FULLTEXT because of it indexes whole words. so for searching words started with "New" you have to put "astrisk" sign in the end:

MATCH (`brand`) AGAINST ('new*')

More detailed here

0

精彩评论

暂无评论...
验证码 换一张
取 消