Searching for addons can result in wrong results

VERIFIED FIXED in mozilla2.0b4

Status

()

Toolkit
Add-ons Manager
VERIFIED FIXED
8 years ago
8 years ago

People

(Reporter: whimboo, Assigned: Unfocused)

Tracking

Trunk
mozilla2.0b4
Points:
---
Bug Flags:
in-testsuite +
in-litmus -

Firefox Tracking Flags

(blocking2.0 final+)

Details

(Whiteboard: [rewrite][AddonsRewriteTestday])

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a4pre) Gecko/20100407 Minefield/3.7a4pre (.NET CLR 3.5.30729)

As it looks like the search algorithm doesn't handle '.' and probably other special characters very well. Searching for ".net" on Windows results in two results: "Microsoft .NET Framework Assistant" and "Default Theme".

The latter one should definitely not be a result for that particular search.
Another search term where incorrect results are reported is for example

"javascript:void()" where all installed add-ons are returned instead of the appropriate number of results.

Updated

8 years ago
Whiteboard: [rewrite] → [rewrite][AddonsRewriteTestday]
"réf" for Dictionnaire MySpell en Francais (réforme 1990) doesn't find this, but the German dictionary.
Probably something to do with matching based on word boundaries, rather than whitespace.

See also bug 557701.
blocking2.0: --- → final+
Assignee: nobody → bmcbride
Created attachment 462367 [details] [diff] [review]
Patch

This changes the matching algorithm to split strings based on whitespace, rather than word boundaries (which was trying to be a bit too smart, and failing miserably).

Note that the test has a couple of todo notes that can be removed once bug 582058 lands.
Attachment #462367 - Flags: review?(dtownsend)
Comment on attachment 462367 [details] [diff] [review]
Patch

I'm a little concerned that we're just re-inventing the wheel with this search matching code. For now it seems to be ok but if we start playing whack-a-mole too much we may want to just see if there is some existing open source code that does what we need.
Attachment #462367 - Flags: review?(dtownsend) → review+
Keywords: checkin-needed
Landed: http://hg.mozilla.org/mozilla-central/rev/f53e379c3448
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Flags: in-testsuite+
Flags: in-litmus-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b4
(Reporter)

Comment 7

8 years ago
Verified fixed with Mozilla/5.0 (Windows NT 5.1; rv:2.0b4pre) Gecko/20100810 Minefield/4.0b4pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.