Closed Bug 627612 Opened 11 years ago Closed 10 years ago

Search results for add-ons do not have the same order as returned by the AMO API

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla6
Tracking Status
status2.0 --- wanted

People

(Reporter: jbalogh, Assigned: mossop)

References

Details

Attachments

(1 file)

Fresh install, sorted by Best Match: https://img.skitch.com/20110121-whn2m6mb3x68t9xjq3pw7dg7c.jpg

I'd expect our most popular add-on to be first, not https://addons.mozilla.org/en-US/firefox/addon/adblock-plus-pop-up-addon/.
Curious indeed! Mossop: any idea what's going on here?
This is a client bug, for some reason we've ended up sorting search results for available add-ons in the same way as installed add-ons using our own simplistic algorithm for ordering.

We should just hardcode it to show in your order since I'm pretty sure you do better ordering than we do.

Not terribly broken so don't think I'd even call this a blocker at this point, would take a fix though.
status2.0: --- → wanted
Component: Search → Add-ons Manager
Product: addons.mozilla.org → Toolkit
QA Contact: search → add-ons.manager
Summary: Adblock Plus is not first when searching for "adblock" → Add-ons Manager should display available add-ons in the same order that AMO would
Target Milestone: Q1 2011 → ---
Version: 4.x → Trunk
> We should just hardcode it to show in your order since I'm pretty sure you do
> better ordering than we do.

I get yelled at when stuff gets out of order.
(In reply to comment #5)
> Related to bug 593336?

I don't think so, that is more about making it so it isn't possible to show the least relevant matches first.
Summary: Add-ons Manager should display available add-ons in the same order that AMO would → Search results for add-ons do not have the same order as returned by the AMO API
We should definitely fix this for 5, maybe even a 4.x release.
Whiteboard: [wanted fx5]
Duplicate of this bug: 651630
Have a patch, just wrestling with tests
Assignee: nobody → dtownsend
Attached patch patch rev 1Splinter Review
Wish I had realised how easy this was going to be sooner :(
Attachment #527402 - Flags: review?(bmcbride)
Whiteboard: [wanted fx5] → [wanted fx5][has patch][needs review Unfocused]
Comment on attachment 527402 [details] [diff] [review]
patch rev 1

Sorry for the delay :\

>+      aObjsList.forEach(function(aObj, aIndex) {
>+        let score = aObjsList.length - aIndex;
>+        if (!aIsRemote && aQuery.length > 0) {
>           score = self.getMatchScore(aObj, aQuery);
>           if (score == 0 && !aIsRemote)

This second check for !aIsRemote is now redundant and can be removed,

r=me with that fixed.
Attachment #527402 - Flags: review?(bmcbride) → review+
Whiteboard: [wanted fx5][has patch][needs review Unfocused] → [wanted fx5][has patch]
Landed: http://hg.mozilla.org/mozilla-central/rev/62fd01c5fd42
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [wanted fx5][has patch]
Target Milestone: --- → mozilla6
Verified fixed with Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0a1) Gecko/20110501 Firefox/6.0a1

Dave, can we try to get approval for the patch on the aurora branch? Would be great to see this fixed in Firefox 5.
Status: RESOLVED → VERIFIED
The automated test should be enough, so I don't plan to create a Litmus test.
Flags: in-litmus-
(In reply to comment #13)
> Dave, can we try to get approval for the patch on the aurora branch? Would
> be great to see this fixed in Firefox 5.

Dave, do you have an answer for me for this question? It's really irritating for users to not see the exact match listed as the first item.
(In reply to comment #15)
> (In reply to comment #13)
> > Dave, can we try to get approval for the patch on the aurora branch? Would
> > be great to see this fixed in Firefox 5.
> 
> Dave, do you have an answer for me for this question? It's really irritating
> for users to not see the exact match listed as the first item.

This isn't something bad enough that we should be trying to bypass the release process.
You need to log in before you can comment on or make changes to this bug.