| 1 |
-- Break fulltext search index out to separate table from cur |
| 2 |
-- This is being done mainly to allow us to use InnoDB tables |
| 3 |
-- for the main db while keeping the MyISAM fulltext index for |
| 4 |
-- search. |
| 5 |
|
| 6 |
-- 2002-12-16, 2003-01-25 Brooke Vibber <[email protected]> |
| 7 |
|
| 8 |
-- Creating searchindex table... |
| 9 |
DROP TABLE IF EXISTS /*$wgDBprefix*/searchindex; |
| 10 |
CREATE TABLE /*$wgDBprefix*/searchindex ( |
| 11 |
-- Key to page_id |
| 12 |
si_page int unsigned NOT NULL, |
| 13 |
|
| 14 |
-- Munged version of title |
| 15 |
si_title varchar(255) NOT NULL default '', |
| 16 |
|
| 17 |
-- Munged version of body text |
| 18 |
si_text mediumtext NOT NULL, |
| 19 |
|
| 20 |
UNIQUE KEY (si_page) |
| 21 |
|
| 22 |
) ENGINE=MyISAM; |
| 23 |
|
| 24 |
-- Copying data into new table... |
| 25 |
INSERT INTO /*$wgDBprefix*/searchindex |
| 26 |
(si_page,si_title,si_text) |
| 27 |
SELECT |
| 28 |
cur_id,cur_ind_title,cur_ind_text |
| 29 |
FROM /*$wgDBprefix*/cur; |
| 30 |
|
| 31 |
|
| 32 |
-- Creating fulltext index... |
| 33 |
ALTER TABLE /*$wgDBprefix*/searchindex |
| 34 |
ADD FULLTEXT si_title (si_title), |
| 35 |
ADD FULLTEXT si_text (si_text); |
| 36 |
|
| 37 |
-- Dropping index columns from cur table. |
| 38 |
ALTER TABLE /*$wgDBprefix*/cur |
| 39 |
DROP COLUMN cur_ind_title, |
| 40 |
DROP COLUMN cur_ind_text; |