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
b048930e
Commit
b048930e
authored
Mar 01, 2011
by
Sam Morris
Committed by
Max Kanat-Alexander
Mar 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 634144: Make possible_duplicates work on PostgreSQL
r=mkanat, a=mkanat
parent
5137b07b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
DB.pm
Bugzilla/DB.pm
+11
-3
Search.pm
Bugzilla/Search.pm
+1
-1
No files found.
Bugzilla/DB.pm
View file @
b048930e
...
@@ -437,7 +437,7 @@ sub sql_fulltext_search {
...
@@ -437,7 +437,7 @@ sub sql_fulltext_search {
@words
=
map
(
"LOWER($column) LIKE $_"
,
@words
);
@words
=
map
(
"LOWER($column) LIKE $_"
,
@words
);
# search for occurrences of all specified words in the column
# search for occurrences of all specified words in the column
return
"CASE WHEN ("
.
join
(
" AND "
,
@words
)
.
") THEN 1 ELSE 0 END"
;
return
join
(
" AND "
,
@words
),
"CASE WHEN ("
.
join
(
" AND "
,
@words
)
.
") THEN 1 ELSE 0 END"
;
}
}
#####################################################################
#####################################################################
...
@@ -2077,8 +2077,16 @@ Note that both parameters need to be sql-quoted.
...
@@ -2077,8 +2077,16 @@ Note that both parameters need to be sql-quoted.
=item B<Description>
=item B<Description>
Returns SQL syntax for performing a full text search for specified text
Returns one or two SQL expressions for performing a full text search for
on a given column.
specified text on a given column.
If one value is returned, it is a numeric expression that indicates
a match with a positive value and a non-match with zero. In this case,
the DB must support casting numeric expresions to booleans.
If two values are returned, then the first value is a boolean expression
that indicates the presence of a match, and the second value is a numeric
expression that can be used for ranking.
There is a ANSI SQL version of this method implemented using LIKE operator,
There is a ANSI SQL version of this method implemented using LIKE operator,
but it's not a real full text search. DB specific modules should override
but it's not a real full text search. DB specific modules should override
...
...
Bugzilla/Search.pm
View file @
b048930e
...
@@ -2263,7 +2263,7 @@ sub _content_matches {
...
@@ -2263,7 +2263,7 @@ sub _content_matches {
$rterm2
=
$term2
if
!
$rterm2
;
$rterm2
=
$term2
if
!
$rterm2
;
# The term to use in the WHERE clause.
# The term to use in the WHERE clause.
my
$term
=
"$term1
> 0 OR $term2 > 0
"
;
my
$term
=
"$term1
OR $term2
"
;
if
(
$operator
=~
/not/i
)
{
if
(
$operator
=~
/not/i
)
{
$term
=
"NOT($term)"
;
$term
=
"NOT($term)"
;
}
}
...
...
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