I have a problem with the MATCH AGAINST function.
The following query give me the same result:
SELECT * FROM models MATCH(name) AGAINST('Fiat 500')
SELECT * FROM models MATCH(name) AGAINST('Fiat')
How can I search for both strings and numbers in a column of a FULL TEXT table?
Thanks
If you need
Fiatand500anywhere where order does not matter, thenIf you need
Fiat 500together, thenIf you need
Fiatand zero or more500, thenIf you need
500and zero or moreFiat, thenGive it a Try !!!
UPDATE 2013-01-28 18:28 EDT
Here are the default settings for FULLTEXT searching
Notice that ft_min_word_len is 4 by default. The token 500 is length 3. thus it will not be indexed at all. You will have to do three(3) things:
STEP 01 : Configure for smaller string tokens
Add this to
/etc/my.cnfSTEP 02 : Restart mysql
STEP 03 : Reindex all indexes in the
modelstableYou could just drop and add the FULLTEXT index
or do it in stages and see how big it will get in advance
When you are satisfied this worked, then run
Give it a Try !!!