diff --git a/upload/cb_install/sql/structure.sql b/upload/cb_install/sql/structure.sql index aea99828..0d7e1510 100644 --- a/upload/cb_install/sql/structure.sql +++ b/upload/cb_install/sql/structure.sql @@ -1221,6 +1221,7 @@ ALTER TABLE `{tbl_prefix}video` ADD `conv_progress` TEXT NOT NULL; ALTER TABLE `{tbl_prefix}video` ADD `file_type` INT( 10 ) NOT NULL DEFAULT '0' AFTER `file_name`; ALTER TABLE `{tbl_prefix}video` ADD `blocked_countries` TEXT( 255 ) NOT NULL AFTER `country`; ALTER TABLE `{tbl_prefix}video` ADD `sprite_count` INT(11) NOT NULL DEFAULT '0' AFTER `blocked_countries`; +ALTER TABLE `{tbl_prefix}video` ADD FULLTEXT INDEX (`title`,`tags`); /*Cb_user_profile_info*/ ALTER TABLE `{tbl_prefix}user_profile` ADD `fb_url` VARCHAR(200) NOT NULL AFTER `web_url`, ADD `twitter_url` VARCHAR(200) NOT NULL AFTER `fb_url`, ADD `insta_url` VARCHAR(200) NOT NULL AFTER `twitter_url`; diff --git a/upload/cb_install/sql/upgrade_4.1.sql b/upload/cb_install/sql/upgrade_4.1.sql new file mode 100644 index 00000000..5ab6d28e --- /dev/null +++ b/upload/cb_install/sql/upgrade_4.1.sql @@ -0,0 +1 @@ +-- No db changes made \ No newline at end of file diff --git a/upload/cb_install/sql/upgrade_4.2.sql b/upload/cb_install/sql/upgrade_4.2.sql new file mode 100644 index 00000000..14d5fbef --- /dev/null +++ b/upload/cb_install/sql/upgrade_4.2.sql @@ -0,0 +1,2 @@ +-- enabling Fulltext search with InnoDB as mysql engine +ALTER TABLE `{tbl_prefix}video` ADD FULLTEXT INDEX (`title`,`tags`); \ No newline at end of file diff --git a/upload/includes/classes/video.class.php b/upload/includes/classes/video.class.php index 227e98f2..8aa85467 100644 --- a/upload/includes/classes/video.class.php +++ b/upload/includes/classes/video.class.php @@ -1119,7 +1119,7 @@ class CBvideo extends CBCategory $cond = $superCond." AND "; $cond .= "MATCH(".("video.title,video.tags").") - AGAINST ('".$params['title']."' IN BOOLEAN MODE) "; + AGAINST ('".$params['title']."' IN NATURAL LANGUAGE MODE) "; if($params['exclude']) { @@ -1151,7 +1151,7 @@ class CBvideo extends CBCategory $cond = $superCond." AND "; //Try Finding videos via tags $cond .= "MATCH(".("video.title,video.tags").") - AGAINST ('".($params['tags'])."' IN BOOLEAN MODE) "; + AGAINST ('".($params['tags'])."' IN NATURAL LANGUAGE MODE) "; if($params['exclude']) { if($cond!='')