Closed
Bug 578494
Opened 14 years ago
Closed 14 years ago
QuickSearch for phrases is busted
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: jruderman, Assigned: mkanat)
References
()
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
1.96 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
1.65 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
If I try to QuickSearch for a phrase, I get 200 random bugs that don't even contain the second word. This almost prevents me from getting work done.
Updated•14 years ago
|
Updated•14 years ago
|
Assignee: nobody → query-and-buglist
Component: Bugzilla: Other b.m.o Issues → Query/Bug List
OS: Mac OS X → All
Product: mozilla.org → Bugzilla
QA Contact: other-bmo-issues → default-qa
Hardware: x86 → All
Target Milestone: --- → Bugzilla 3.6
Version: other → 3.6.1
Updated•14 years ago
|
Severity: blocker → major
Flags: blocking4.0?
Flags: blocking3.6.2?
Assignee | ||
Comment 1•14 years ago
|
||
reed: I'm not entirely sure that this is an upstream bug. Can you reproduce it on landfill? I'm seeing a lot of bugs like "my search returns random results" reported against bmo.
Comment 2•14 years ago
|
||
Here's a patch that should work for the 3.6 branch. 4.0 and trunk need a better fix.
Attachment #457245 -
Flags: review?(mkanat)
Assignee | ||
Comment 3•14 years ago
|
||
Comment on attachment 457245 [details] [diff] [review]
patch - v1 (3.6 branch)
This won't work on Pg, as mentioned on IRC:
reed: The upstream problem is that we don't actually have a fulltext engine for Pg.
reed: So we have to understand quotes inside of sql_fulltext or whatever it's called, in Bugzilla/DB.pm.
reed: That could probably be accomplished by using splitwords from Text::ParseWords instead of just splitting the string.
Attachment #457245 -
Flags: review?(mkanat) → review-
Assignee | ||
Comment 4•14 years ago
|
||
Or shellwords, more specifically--that tends to work the most simply.
Comment 5•14 years ago
|
||
Comment on attachment 457245 [details] [diff] [review]
patch - v1 (3.6 branch)
Landed on bmo 3.6 branch as a temp hack until a better fix is made.
Committing to: bzr+ssh://bzr.mozilla.org/bmo/3.6/
modified Bugzilla/Search/Quicksearch.pm
Committed revision 7160.
Comment 6•14 years ago
|
||
Looks like a dupe of bug 556579.
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #6)
> Looks like a dupe of bug 556579.
No, that bug only affects 4.0, and this bug is against 3.6.
Assignee | ||
Updated•14 years ago
|
Flags: blocking4.0?
Flags: blocking4.0+
Flags: blocking3.6.2?
Flags: blocking3.6.2+
Assignee | ||
Comment 8•14 years ago
|
||
Before I go about this: I'm assuming that Oracle fulltext understands quotes mean "this is a phrase", yes?
Assignee | ||
Comment 9•14 years ago
|
||
This should fix it on 3.6, 4.0, and trunk, I'm pretty sure.
Assignee: query-and-buglist → mkanat
Attachment #457245 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #458553 -
Flags: review?(reed)
Comment 11•14 years ago
|
||
Comment on attachment 458553 [details] [diff] [review]
v1
No time to get to this until minimum of next week.
Attachment #458553 -
Flags: review?(reed) → review?(LpSolit)
Comment 12•14 years ago
|
||
Comment on attachment 458553 [details] [diff] [review]
v1
>=== modified file 'Bugzilla/Search/Quicksearch.pm'
>+sub _matches_phrase {
>+ $phrase =~ s/"/\\"/g;
Seems to work, but I'm not sure about to trigger this line as shellwords() splits phrases on quotes. r=LpSolit
Attachment #458553 -
Flags: review?(LpSolit) → review+
Assignee | ||
Comment 14•14 years ago
|
||
Thanks! It should apply on 4.0 and 3.6 also--there haven't been any significant changes to that code since 3.6.
Flags: approval?
Flags: approval4.0+
Flags: approval3.6+
Flags: approval+
Assignee | ||
Comment 15•14 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/DB.pm
modified Bugzilla/Search/Quicksearch.pm
Committed revision 7397.
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.0/
modified Bugzilla/DB.pm
modified Bugzilla/Search/Quicksearch.pm
Committed revision 7341.
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/3.6/
modified Bugzilla/DB.pm
modified Bugzilla/Search/Quicksearch.pm
Committed revision 7144.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 16•14 years ago
|
||
Something about this fix is breaking the fulltext search, according to the xt/search tests on our tinderboxen.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 17•14 years ago
|
||
Okay, this fixes the problem with Pg. The problem was that shellwords absolutely can't handle unbalanced quotes--it returns an empty result if you do something like: "don't try this" for content/matches (without the double-quotes). So instead, I'm doing a hack just to allow Quicksearch to work properly on Pg.
Attachment #461961 -
Flags: review?(LpSolit)
Assignee | ||
Comment 18•14 years ago
|
||
BTW, there's also currently some taint error on Pg for quicksearch, on HEAD. I have to find out what it is.
Comment 19•14 years ago
|
||
Comment on attachment 461961 [details] [diff] [review]
Pg: No shellwords, v1
Seems to work fine. Let's hope we don't regress anything else. :) r=LpSolit
Attachment #461961 -
Flags: review?(LpSolit) → review+
Assignee | ||
Comment 20•14 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/DB.pm
Committed revision 7415.
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.0/
modified Bugzilla/DB.pm
Committed revision 7358.
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/3.6/
modified Bugzilla/DB.pm
Committed revision 7151.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Comment 21•14 years ago
|
||
This is "fixed" (upstream), do we need another bug to get this patch deployed so it's actually fixed for BMO users?
Assignee | ||
Comment 22•14 years ago
|
||
(In reply to comment #21)
> This is "fixed" (upstream), do we need another bug to get this patch deployed
> so it's actually fixed for BMO users?
Well, no, I think Mozilla just needs to employ some person who actually has time to work on bugzilla.mozilla.org. (Currently all maintenance is being done by volunteers, really.)
Comment 23•14 years ago
|
||
If it got committed to the 3.6 branch upstream, then we should have it on b.m.o already. I just merged it again yesterday when 3.6.2 released.
You need to log in
before you can comment on or make changes to this bug.
Description
•