summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authormyk%mozilla.org <>2003-09-03 11:03:30 +0200
committermyk%mozilla.org <>2003-09-03 11:03:30 +0200
commit94266c521b3e388b41f3dd6f74948a9ec71997d5 (patch)
treea93a6a69eb5aa233b9e0de3357c9866092ff86c0 /checksetup.pl
parentb58af575949ab6ae74800873feef0e22ed763577 (diff)
downloadbugzilla-94266c521b3e388b41f3dd6f74948a9ec71997d5.tar.gz
bugzilla-94266c521b3e388b41f3dd6f74948a9ec71997d5.tar.xz
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
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl16
1 files changed, 15 insertions, 1 deletions
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:
#