Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
3f868ed5
Commit
3f868ed5
authored
Aug 26, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 347864: Generally improve fulltext search
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=myk, a=myk
parent
40a2b11f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
Search.pm
Bugzilla/Search.pm
+3
-11
No files found.
Bugzilla/Search.pm
View file @
3f868ed5
...
...
@@ -591,7 +591,7 @@ sub init {
# short_desc searching for the WHERE clause
my
@words
=
_split_words_into_like
(
'bugs.short_desc'
,
$v
);
my
$term2_where
=
join
(
'
AND
'
,
@words
);
my
$term2_where
=
join
(
'
OR
'
,
@words
);
# short_desc relevance
my
$factor
=
SUMMARY_RELEVANCE_FACTOR
;
...
...
@@ -605,18 +605,10 @@ sub init {
# we SELECT the relevance value and give it an alias so we can
# add it to the SORT BY clause when we build it in buglist.cgi.
#
# Note: MySQL calculates relevance for each comment separately,
# so we need to do some additional calculations to get an overall
# relevance value, which we do by calculating the average (mean)
# comment relevance and then adding the summary relevance, if any.
# This weights summary relevance heavily, which makes sense
# since summaries are short and thus highly significant.
#
# Note: We should be calculating the average relevance of all
# Note: We should be calculating the relevance based on all
# comments for a bug, not just matching comments, but that's hard
# (see http://bugzilla.mozilla.org/show_bug.cgi?id=145588#c35).
my
$select_term
=
"(SUM($term1)/COUNT(${table}.comment_id)"
.
" + $term2_select) AS relevance"
;
my
$select_term
=
"(SUM($term1) + $term2_select) AS relevance"
;
# add the column not used in aggregate function explicitly
push
(
@groupby
,
'bugs.short_desc'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment