From 94266c521b3e388b41f3dd6f74948a9ec71997d5 Mon Sep 17 00:00:00 2001 From: "myk%mozilla.org" <> Date: Wed, 3 Sep 2003 09:03:30 +0000 Subject: Fix for bug 145588: adds full-text search option for more accurate finding of individual bugs via words that appear in their descriptions/comments/summaries. r=bbaetz a=myk --- checksetup.pl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'checksetup.pl') diff --git a/checksetup.pl b/checksetup.pl index 8b348211b..b7cffb05d 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -1590,6 +1590,8 @@ $table{bugs} = index (target_milestone), index (qa_contact), index (votes), + + fulltext (short_desc), unique(alias)'; @@ -1618,7 +1620,8 @@ $table{longdescs} = isprivate tinyint not null default 0, index(bug_id), index(who), - index(bug_when)'; + index(bug_when), + fulltext (thetext)'; $table{components} = @@ -2043,6 +2046,8 @@ AddFDef("setters.login_name", "Flag Setter", 0); AddFDef("work_time", "Hours Worked", 0); AddFDef("percentage_complete", "Percentage Complete", 0); +AddFDef("content", "Content", 0); + ########################################################################### # Detect changed local settings ########################################################################### @@ -4044,6 +4049,15 @@ if ($sth->rows == 0) { print "\n$login is now set up as an administrator account.\n"; } +# Add fulltext indexes for bug summaries and descriptions/comments. +if (!defined GetIndexDef('bugs', 'short_desc')) { + print "Adding full-text index for short_desc column in bugs table...\n"; + $dbh->do('ALTER TABLE bugs ADD FULLTEXT (short_desc)'); +} +if (!defined GetIndexDef('longdescs', 'thetext')) { + print "Adding full-text index for thetext column in longdescs table...\n"; + $dbh->do('ALTER TABLE longdescs ADD FULLTEXT (thetext)'); +} # 2002 November, myk@mozilla.org, bug 178841: # -- cgit v1.2.3-24-g4f1b