Sasa Posted May 18, 2015 Report Share Posted May 18, 2015 (edited) Vadoties pēc dokumentācijas Full-text indexes can be created only for CHAR, VARCHAR, or TEXT columns Bet kā tad veikt meklēšanu vienīgais variants paliek lietot LIKE ? Aizmirsu piebilsts ka tas ir MySQL's un tabula ir myISAM. Edited May 18, 2015 by Sasa Quote Link to comment Share on other sites More sharing options...
e-remit Posted May 19, 2015 Report Share Posted May 19, 2015 Ja gribi kārtīgu full-text search, papēti Sphinx! Quote Link to comment Share on other sites More sharing options...
Sasa Posted May 19, 2015 Author Report Share Posted May 19, 2015 (edited) Man neļāva jo es gribēju vairākās kolonas ielikt full-text indeksā tur miksējās tipi bija Mediumtext un Varchar's. Mēģināju likt tikai uz vienu kolonu (Mediumtext) atļāva. Tad varbūt tādā gadījumā taisīt divus Full-text indexus vienu uz Mediumtext kolonu otru uz pārējām divām kolonām kuras ir varchar? Edited May 19, 2015 by Sasa Quote Link to comment Share on other sites More sharing options...
Sasa Posted May 20, 2015 Author Report Share Posted May 20, 2015 (edited) Kļūdu tagad nepateikšu. Bet tabula nebija tukša, aizpildītai tabulai mēģināju pielikt full-text indeksu. nice1 vari atsūtīt datubāzes dumpu, palūrēšu salīdzināšu. Errors šāds: #1283 - Column 'texts' cannot be part of FULLTEXT index Tabula šāda: CREATE TABLE `menu2` ( `menu_id` int(11) NOT NULL AUTO_INCREMENT, `ispub` tinyint(4) NOT NULL DEFAULT '0', `site_id` int(11) NOT NULL DEFAULT '0', `lang_id` int(11) NOT NULL DEFAULT '0', `pmenu_id` int(11) NOT NULL DEFAULT '0', `caption` varchar(255) DEFAULT '', `mdesc` varchar(255) NOT NULL DEFAULT '', `type` varchar(50) NOT NULL DEFAULT '', `so` int(11) NOT NULL DEFAULT '1', `texts` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci, `left_col_content` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `m_title` varchar(255) DEFAULT '', `m_desc` text NOT NULL, `m_keys` text NOT NULL, `rgt_col` varchar(50) NOT NULL DEFAULT '', `rgt_param` varchar(50) NOT NULL DEFAULT '', `show_jaun` smallint(1) NOT NULL DEFAULT '0', `jaun_c` int(11) NOT NULL DEFAULT '0', `ecom_cat` tinyint(4) NOT NULL DEFAULT '0', `source_from` varchar(255) NOT NULL, `fb_soc_buttons` tinyint(4) NOT NULL DEFAULT '0', `drlv_soc_buttons` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`menu_id`), KEY `so` (`so`), KEY `site_id` (`site_id`), KEY `lang_idi` (`lang_id`), KEY `pmenu_id` (`pmenu_id`), KEY `ispub` (`ispub`) ) ENGINE=MyISAM AUTO_INCREMENT=19141 DEFAULT CHARSET=utf8; Index tiek veidots šādi: ALTER TABLE `menu2` ADD FULLTEXT( `caption`, `texts`, `m_title`); Edited May 20, 2015 by Sasa Quote Link to comment 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.