Reputation: 6003
I am trying to search my table for some mobile phones and am trying to get the results via Full-text search. My query is:
SELECT id,itemid,title,MATCH(title) AGAINST
("SAMSUNG GALAXY S3" IN NATURAL LANGUAGE MODE) as score
FROM `deals`WHERE MATCH(title) AGAINST
("SAMSUNG GALAXY S3" IN NATURAL LANGUAGE MODE) ORDER BY score desc;
The results i get are shown in the image below:
What i expect is the second result to come up on top as it is the exact match, but it doesn't. Can somebody please correct me on what i might be doing wrong here.
Thanks.
Edit Results in boolean mode
Upvotes: 1
Views: 264
Reputation: 16037
I'm afraid "S3" is too short token to be considered to be a word by the full text search. See relevant section of the docs (the default minimum word length is 4 characters) http://dev.mysql.com/doc/refman//5.5/en/server-system-variables.html#sysvar_ft_min_word_len
EDIT you can verify this by searching for e.g.:
"SAMSUNG GALAXY S360"
Upvotes: 1