diff options
author | myk%mozilla.org <> | 2003-09-03 11:03:30 +0200 |
---|---|---|
committer | myk%mozilla.org <> | 2003-09-03 11:03:30 +0200 |
commit | 94266c521b3e388b41f3dd6f74948a9ec71997d5 (patch) | |
tree | a93a6a69eb5aa233b9e0de3357c9866092ff86c0 /buglist.cgi | |
parent | b58af575949ab6ae74800873feef0e22ed763577 (diff) | |
download | bugzilla-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 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/buglist.cgi b/buglist.cgi index 4beb57a09..bff5e75e0 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -619,6 +619,15 @@ if ($db_order =~ /bugs.target_milestone/) { $query =~ s/\sWHERE\s/ LEFT JOIN milestones ms_order ON ms_order.value = bugs.target_milestone AND ms_order.product_id = bugs.product_id WHERE /; } +# Even more disgusting hack: if we are doing a full text search, +# order by relevance instead of anything else, and limit to 200 results. +if ($search->{'sorted_by_relevance'}) { + $db_order = $order = "relevance DESC LIMIT 200"; + $vars->{'sorted_by_relevance'} = 1; +} + + + $query .= " ORDER BY $db_order " if ($order); |