2003-04-14 23:10:40 +00:00
|
|
|
-- Break fulltext search index out to separate table from cur
|
|
|
|
|
-- This is being done mainly to allow us to use InnoDB tables
|
|
|
|
|
-- for the main db while keeping the MyISAM fulltext index for
|
|
|
|
|
-- search.
|
|
|
|
|
|
2024-02-09 01:02:16 +00:00
|
|
|
-- 2002-12-16, 2003-01-25 Brooke Vibber <bvibber@wikimedia.org>
|
2003-04-14 23:10:40 +00:00
|
|
|
|
|
|
|
|
-- Creating searchindex table...
|
2005-01-14 13:33:17 +00:00
|
|
|
DROP TABLE IF EXISTS /*$wgDBprefix*/searchindex;
|
|
|
|
|
CREATE TABLE /*$wgDBprefix*/searchindex (
|
2005-05-02 08:40:17 +00:00
|
|
|
-- Key to page_id
|
2007-06-22 20:09:59 +00:00
|
|
|
si_page int unsigned NOT NULL,
|
2012-10-20 11:35:38 +00:00
|
|
|
|
2005-05-02 08:40:17 +00:00
|
|
|
-- Munged version of title
|
2011-01-20 23:56:47 +00:00
|
|
|
si_title varchar(255) NOT NULL default '',
|
2012-10-20 11:35:38 +00:00
|
|
|
|
2005-05-02 08:40:17 +00:00
|
|
|
-- Munged version of body text
|
2006-12-21 21:40:43 +00:00
|
|
|
si_text mediumtext NOT NULL,
|
2012-10-20 11:35:38 +00:00
|
|
|
|
2003-04-14 23:10:40 +00:00
|
|
|
UNIQUE KEY (si_page)
|
2005-05-02 08:40:17 +00:00
|
|
|
|
2008-07-10 22:00:04 +00:00
|
|
|
) ENGINE=MyISAM;
|
2003-04-14 23:10:40 +00:00
|
|
|
|
|
|
|
|
-- Copying data into new table...
|
2005-01-14 13:33:17 +00:00
|
|
|
INSERT INTO /*$wgDBprefix*/searchindex
|
2003-04-14 23:10:40 +00:00
|
|
|
(si_page,si_title,si_text)
|
|
|
|
|
SELECT
|
|
|
|
|
cur_id,cur_ind_title,cur_ind_text
|
2005-01-14 13:33:17 +00:00
|
|
|
FROM /*$wgDBprefix*/cur;
|
2003-04-14 23:10:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Creating fulltext index...
|
2005-01-14 13:33:17 +00:00
|
|
|
ALTER TABLE /*$wgDBprefix*/searchindex
|
2003-04-14 23:10:40 +00:00
|
|
|
ADD FULLTEXT si_title (si_title),
|
|
|
|
|
ADD FULLTEXT si_text (si_text);
|
|
|
|
|
|
|
|
|
|
-- Dropping index columns from cur table.
|
2005-01-14 13:33:17 +00:00
|
|
|
ALTER TABLE /*$wgDBprefix*/cur
|
2003-04-14 23:10:40 +00:00
|
|
|
DROP COLUMN cur_ind_title,
|
|
|
|
|
DROP COLUMN cur_ind_text;
|