full text search - MySql "MATCH" is not woking using a specific word -
i'm having weird problem in mysql query, using match-against works on words , not on others, specific query returns 0 rows:
select * series match (name_e,name_a) against ("one");
1- i'm using utf8_general_ci
, not case sensitivity issue
2- other 3 characters searches return propper results (like "key" example) not minimum characters issue.
here 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 sample data used test:
insert `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 `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 `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');
"one" in mysql stopwords file.
http://dev.mysql.com/doc/refman/5.5/en/fulltext-stopwords.html
the stopwords filtered out prevent common words effecting results.
you can set own stopword list using these settings: "to override default stopword list, set ft_stopword_file system variable." http://dev.mysql.com/doc/refman/5.5/en/fulltext-fine-tuning.html
Comments
Post a Comment