I'm having a weird problem in a mysql query, where using MATCH-AGAINST works on some words and not on others, this is the specific query that returns 0 rows:
SELECT * from series WHERE MATCH (name_e,name_a) AGAINST ("One");
1- I'm using utf8_general_ci
, so its not a case sensitivity issue
2- Other 3 characters searches return the propper results (like "Key" for example) so its not a minimum characters issue.
Here is the Tables structure:
CREATE TABLE `series` (
`series_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`brand_id` int(10) unsigned NOT NULL,
`merchandise_id` int(10) unsigned NOT NULL,
`name_a` varchar(45) NOT NULL,
`name_e` varchar(45) NOT NULL,
`desc_a` text,
`desc_e` text,
`added_by` int(11) NOT NULL DEFAULT '4',
`approved` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`series_id`),
KEY `uniqueEntry` (`brand_id`,`name_e`),
FULLTEXT KEY `nameIndex` (`name_e`,`name_a`)
)
This is some sample data used to test:
INSERT INTO `series`(`series_id`,`brand_id`,`merchandise_id`,`name_a`,`name_e`,`desc_a`,`desc_e`,`added_by`,`approved`)
VALUES ('9', '39', '164', 'Aspire One', 'Aspire One', NULL, NULL, '4', '1');
INSERT INTO `series`(`series_id`,`brand_id`,`merchandise_id`,`name_a`,`name_e`,`desc_a`,`desc_e`,`added_by`,`approved`)
VALUES ('10', '54', '164', 'One', 'One', NULL, NULL, '4', '1');
INSERT INTO `series`(`series_id`,`brand_id`,`merchandise_id`,`name_a`,`name_e`,`desc_a`,`desc_e`,`added_by`,`approved`)
VALUES ('284', '70', '173', 'Key', 'Key', NULL, NULL, '53', '1');