Closed Bug 557943 Opened 14 years ago Closed 14 years ago

Searching for addons can result in wrong results

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla2.0b4
Tracking Status
blocking2.0 --- final+

People

(Reporter: whimboo, Assigned: Unfocused)

References

Details

(Whiteboard: [rewrite][AddonsRewriteTestday])

Attachments

(1 file)

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.
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
Attached patch PatchSplinter Review
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+
Landed: http://hg.mozilla.org/mozilla-central/rev/f53e379c3448
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Flags: in-litmus-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b4
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.

Attachment

General

Created:
Updated:
Size: