Jump to content

Column 'description' cannot be part of FULLTEXT index


Destramic
Go to solution Solved by Barand,

Recommended Posts

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

Link to comment
Share on other sites

  • Solution

 

 

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.