Loading myisam/ft_boolean_search.c +1 −2 Original line number Diff line number Diff line Loading @@ -260,15 +260,14 @@ void _ftb_climb_the_tree(FTB_WORD *ftbw, my_off_t curdoc) else /* if (yn==0) */ { ftbe->cur_weight+=weight; if (ftbe->yesses >= ftbe->ythresh && !ftbe->nos) { yn=ftbe->yesno; ftbe->cur_weight=weight; weight*=ftbe->weight; } else { ftbe->cur_weight+=weight; break; } } Loading mysql-test/r/fulltext.result +7 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,13 @@ Full-text search in MySQL implements vector space model select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE); a b Function MATCH ... AGAINST() is used to do a search select *, MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE) as x from t1; a b x MySQL has now support for full-text search 1 Full-text indexes are called collections 1 Only MyISAM tables support collections 2 Function MATCH ... AGAINST() is used to do a search 0 Full-text search in MySQL implements vector space model 0 delete from t1 where a like "MySQL%"; drop table t1; CREATE TABLE t1 ( Loading mysql-test/t/fulltext.test +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ select * from t1 where MATCH(a,b) AGAINST("+support +collections" IN BOOLEAN MOD select * from t1 where MATCH(a,b) AGAINST("+search" IN BOOLEAN MODE); select * from t1 where MATCH(a,b) AGAINST("+search +(support vector)" IN BOOLEAN MODE); select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE); select *, MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE) as x from t1; delete from t1 where a like "MySQL%"; drop table t1; Loading Loading
myisam/ft_boolean_search.c +1 −2 Original line number Diff line number Diff line Loading @@ -260,15 +260,14 @@ void _ftb_climb_the_tree(FTB_WORD *ftbw, my_off_t curdoc) else /* if (yn==0) */ { ftbe->cur_weight+=weight; if (ftbe->yesses >= ftbe->ythresh && !ftbe->nos) { yn=ftbe->yesno; ftbe->cur_weight=weight; weight*=ftbe->weight; } else { ftbe->cur_weight+=weight; break; } } Loading
mysql-test/r/fulltext.result +7 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,13 @@ Full-text search in MySQL implements vector space model select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE); a b Function MATCH ... AGAINST() is used to do a search select *, MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE) as x from t1; a b x MySQL has now support for full-text search 1 Full-text indexes are called collections 1 Only MyISAM tables support collections 2 Function MATCH ... AGAINST() is used to do a search 0 Full-text search in MySQL implements vector space model 0 delete from t1 where a like "MySQL%"; drop table t1; CREATE TABLE t1 ( Loading
mysql-test/t/fulltext.test +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ select * from t1 where MATCH(a,b) AGAINST("+support +collections" IN BOOLEAN MOD select * from t1 where MATCH(a,b) AGAINST("+search" IN BOOLEAN MODE); select * from t1 where MATCH(a,b) AGAINST("+search +(support vector)" IN BOOLEAN MODE); select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE); select *, MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE) as x from t1; delete from t1 where a like "MySQL%"; drop table t1; Loading