Destramic Posted December 23, 2015 Share Posted December 23, 2015 hey guys im trying to set to columns as a full text index but im receiving an error: Error Code: 1283. Column 'description' cannot be part of FULLTEXT index this is where the fault lies but i dunno why im getting the error...im using innodb engine for the table on mariadb 10 FULLTEXT `items_FULLTEXT` (`description`, `title`), this is the sql i'm executing which is failing....i know innodb now support fulltext so where am i going wrong here please? CREATE TABLE `items` ( `item_id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `sub_category_id` int(11) NOT NULL, `sub_sub_category_id` int(11) DEFAULT NULL, `sub_sub_sub_category_id` int(11) DEFAULT NULL, `user_address_id` int(11) DEFAULT NULL, `condition_id` int(11) DEFAULT NULL, `title` varchar(90) NOT NULL, `description` text NOT NULL, `auction` int(11) NOT NULL, `buy_now` tinyint(1) NOT NULL DEFAULT '0', `starting_price` decimal(15,2) NOT NULL, `listing_duration` enum('1','3','7','10','30') NOT NULL, `buy_now_price` decimal(15,2) NOT NULL, `quantity` int(11) NOT NULL DEFAULT '1', `offers_accepted` tinyint(1) NOT NULL DEFAULT '0', `start_timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `dispatch_time` enum('Same Day','1 Working Day','2 Working Days','3 Working Days') NOT NULL, `returns` int(1) NOT NULL DEFAULT '0', `return_policy` text, `free_delivery` int(1) DEFAULT '0', `free_delivery_condition` enum('Town/City','County','Country','Continent','MENA Region','Worldwide') DEFAULT NULL, `collection` int(1) DEFAULT '0', `collection_only` int(1) DEFAULT '0', `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `personal_delivery` int(1) DEFAULT '0', `personal_delivery_distance` int(10) DEFAULT '0', `persnal_delivery_price` decimal(12,2) DEFAULT '0.01', `draft` int(1) NOT NULL DEFAULT '0', PRIMARY KEY (`item_id`), FULLTEXT `items_FULLTEXT` (`description`, `title`), UNIQUE KEY `items_item_id_UNIQUE` (`item_id`), KEY `items_user_id_INDEX` (`user_id`), KEY `items_category_id_INDEX` (`category_id`), KEY `items_sub_category_id_INDEX` (`sub_category_id`), KEY `items_user_address_id_INDEX` (`user_address_id`), KEY `items_condition_id_INDEX` (`condition_id`), CONSTRAINT `items_category_id_FOREIGN_KEY` FOREIGN KEY (`category_id`) REFERENCES `categories` (`category_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `items_condition_id_FOREIGN_KEY` FOREIGN KEY (`condition_id`) REFERENCES `conditions` (`condition_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `items_sub_category_id_FOREIGN_KEY` FOREIGN KEY (`sub_category_id`) REFERENCES `sub_categories` (`sub_category_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `items_user_address_id_FOREIGN_KEY` FOREIGN KEY (`user_address_id`) REFERENCES `user_addresses` (`user_address_id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `items_user_id_FOREIGN_KEY` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=1243 DEFAULT CHARSET=utf16; thank you Quote Link to comment https://forums.phpfreaks.com/topic/299978-column-description-cannot-be-part-of-fulltext-index/ Share on other sites More sharing options...
Solution Barand Posted December 23, 2015 Solution Share Posted December 23, 2015 For all practical purposes, MariaDB is a binary drop in replacement of the same MySQL version (for example MySQL 5.1 -> MariaDB 5.1, MariaDB 5.2 & MariaDB 5.3 are compatible. MySQL 5.5 is compatible with MariaDB 5.5 and also in practice with MariaDB 10.0). You need MySQL 5.6+ for fulltext on InnoDB Quote Link to comment https://forums.phpfreaks.com/topic/299978-column-description-cannot-be-part-of-fulltext-index/#findComment-1528509 Share on other sites More sharing options...
Destramic Posted December 23, 2015 Author Share Posted December 23, 2015 You need MySQL 5.6+ for fulltext on InnoDB thank you...ok i installed 5.7.10...but i still get same error when executing query =/ Quote Link to comment https://forums.phpfreaks.com/topic/299978-column-description-cannot-be-part-of-fulltext-index/#findComment-1528512 Share on other sites More sharing options...
Destramic Posted December 23, 2015 Author Share Posted December 23, 2015 removing DEFAULT CHARSET=utf16 worked a charm thanks barand Quote Link to comment https://forums.phpfreaks.com/topic/299978-column-description-cannot-be-part-of-fulltext-index/#findComment-1528513 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.