Armin
Armin

Reputation: 369

MySQL Fulltext Search Query Missing Results

I'm having trouble selecting all necessary results using a fulltext search query.

SELECT i.strItemName FROM Item i WHERE MATCH( strItemName ) AGAINST ( 'big*' IN BOOLEAN MODE )

For some reason, the query returns only 5 out of possible 83 results. I don't understand what its doing. It doesn't list items like "Big Panda", "Big Head Boy" etc.

Any advice is much appreciated!

Thanks Armin

Upvotes: 0

Views: 335

Answers (1)

Marc B
Marc B

Reputation: 360702

Fulltext by default has a minimum word length, usually 4 chars (see ft_min_word_length). Anything below the limit is treated as noise and ignored.

To change the limit, set the new value, then you'll have to rebuild your fulltext indexes to get the words which now fall within the indexable limit.

Upvotes: 2

Related Questions