I have a table called myatts
:
- It has about 3,332,834 rows of data.
- I generally search the column "content"
- I have about 40 rows where content = Rat, D.D.
However when I fulltext search for it I get no results. But if I use LIKE I do get the results.
I want to stick with fulltext, can anyone help me figure out why there are no results returned?He开发者_高级运维re is my table structure:
id
int(11) Not null AUTO_INCREMENT
join_id
int(11) Not Null
webid
int(11) Not Null
content
text utf8_general_ci
Here are my indexes
Keyname Type Unique Packed Field Cardinality
PRIMARY BTREE Yes No id 3332834
content BTREE No No content (333) 238059
id_index BTREE No No webid 151492
join_id BTREE No No join_id 36
content_ft FULLTEXT No No content 119029
Here is my query:
SELECT * FROM myatts WHERE MATCH(content) AGAINST('Rat, D.D.' IN BOOLEAN MODE)
Here is the explain:
1 SIMPLE myatts fulltext content_ft content_ft 0 1 Using where
Any help/pointers would be great. Thanks!
Your minimum word length is probably set to 4. Check the MySQL Manual for details..
By default MySQL's fulltext indexer ignores words that are fewer than 4 characters in length. In your my.cnf set this variable:
ft_min_word_len=3
I you probably don't want to go less than 3 because you'll end up with false positives.
精彩评论