Mysql – Why number of matches in fulltext search get less when we put less strings

full-text-searchmyisamMySQL

SELECT * FROM tableauxiliary WHERE MATCH (FullTextSearch)
AGAINST ('resta*' IN NATURAL LANGUAGE MODE)

show 5 results

SELECT * FROM tableauxiliary WHERE MATCH (FullTextSearch)
AGAINST ('restaurant*' IN NATURAL LANGUAGE MODE)

shows 56k

What am I missing? How can something contains restaurant without containing resta

I am using mysql and MyISAM

Best Answer

Maybe more than 50% of your tablerows contain words starting with "resta*".
Words that are present in 50% or more of the rows are considered common and do not match.

So you would only have those rows returned, that have a non-common word also starting with "resta*" in your result.

see: http://dev.mysql.com/doc/refman/5.5/en/fulltext-natural-language.html

Try

SELECT * FROM tableauxiliary WHERE MATCH (FullTextSearch)
AGAINST ('resta*' IN BOOLEAN MODE)

see http://dev.mysql.com/doc/refman/5.6/en/fulltext-boolean.html

Boolean full-text searches have these characteristics: - They do not use the 50% threshold that applies to MyISAM search indexes

I got this here:
Why does MATCH() give Score 0, if there are less rows in the database?