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 --- buglist.cgi | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'buglist.cgi') 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); -- cgit v1.2.3-24-g4f1b