Description:
Hi,
Fulltext search seems to not work properly with numbers.
Regards,
Jocelyn
How to repeat:
CREATE TABLE `fiches_myisam` (
`id_produit` smallint(5) unsigned NOT NULL default '0',
`liste_options` text NOT NULL,
PRIMARY KEY (`id_produit`),
FULLTEXT KEY `liste_options` (`liste_options`)
) TYPE=MyISAM;
INSERT INTO fiches_myisam VALUES ('6280','223 226');
SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('226');
Empty set (0.00 sec)
=> This should return a result
INSERT INTO fiches_myisam VALUES ('6281','226');
SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('226');
Empty set (0.00 sec)
=> Still no result
INSERT INTO fiches_myisam VALUES ('6282','223');
SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('226');
Empty set (0.01 sec)
INSERT INTO fiches_myisam VALUES ('6283','223');
SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('226');
Empty set (0.01 sec)
INSERT INTO fiches_myisam VALUES ('6284','223 223');
SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('226');
+------------+
| id_produit |
+------------+
| 6281 |
| 6280 |
+------------+
=> Will the latest insert (which doesn't contain '226'), the query now works ?!
However :
SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('223');
Empty set (0.00 sec)
=> still produce no result for '223'
(PS : My ft_min_word_len is set to 1, and ft_stopword_file is set to /dev/null)
Description: Hi, Fulltext search seems to not work properly with numbers. Regards, Jocelyn How to repeat: CREATE TABLE `fiches_myisam` ( `id_produit` smallint(5) unsigned NOT NULL default '0', `liste_options` text NOT NULL, PRIMARY KEY (`id_produit`), FULLTEXT KEY `liste_options` (`liste_options`) ) TYPE=MyISAM; INSERT INTO fiches_myisam VALUES ('6280','223 226'); SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('226'); Empty set (0.00 sec) => This should return a result INSERT INTO fiches_myisam VALUES ('6281','226'); SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('226'); Empty set (0.00 sec) => Still no result INSERT INTO fiches_myisam VALUES ('6282','223'); SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('226'); Empty set (0.01 sec) INSERT INTO fiches_myisam VALUES ('6283','223'); SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('226'); Empty set (0.01 sec) INSERT INTO fiches_myisam VALUES ('6284','223 223'); SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('226'); +------------+ | id_produit | +------------+ | 6281 | | 6280 | +------------+ => Will the latest insert (which doesn't contain '226'), the query now works ?! However : SELECT id_produit FROM fiches_myisam WHERE MATCH ( fiches_myisam.liste_options ) AGAINST ('223'); Empty set (0.00 sec) => still produce no result for '223' (PS : My ft_min_word_len is set to 1, and ft_stopword_file is set to /dev/null)