Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

MATCH (FullTextSearch) AGAINST ('k*' IN BOOLEAN MODE)

return something

Namely anything with a word that start with k

MATCH (FullTextSearch) AGAINST ('ku*' IN BOOLEAN MODE) return less

MATCH (FullTextSearch) AGAINST ('kuc*' IN BOOLEAN MODE)

return even less

we figure that more should be returned if we just use *

MATCH (FullTextSearch) AGAINST ('*' IN BOOLEAN MODE)

returns nothing instead of what it should, namely EVERYTHING. Why?

Note: This means I have to specially code my sql command for empty string.

share|improve this question
3  
A quick glance at the documentation gives the answer to this...I don't know mysql at all and I got the answer in like 20 seconds –  JNK Jun 21 '12 at 10:37
    
where is the documentation. Why do they design it that way? This means I have to specially code my sql command for empty string. –  Jim Thio Jun 21 '12 at 10:38
    
    
Not sure anyone can answer the "why" question though. It's not a standard wildcard search, it's a wildcard in the context of a word –  JNK Jun 21 '12 at 10:39
2  
You've asked 7 questions in the last 13 hours. It may be worthwhile to consider doing a little research before coming here. –  JNK Jun 21 '12 at 10:40
show 2 more comments

1 Answer

Per the MySQL Documentation on Boolean mode Full Text Search the aserisk wildcard is only applicable in the context of a word.

The engine is looking for a word that starts with whatever precedes the asterisk. Since there is nothing preceding the asterisk, and no words start with an empty string, you get no results.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.