Closed Bug 862454 Opened 11 years ago Closed 11 years ago

[buchets] Search API should filter apps based on feature profile.

Categories

(Marketplace Graveyard :: API, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2013-06-06

People

(Reporter: basta, Assigned: robhudson)

References

Details

(Whiteboard: p=2)

      No description provided.
Depends on: 862459
Blocks: 862474
An unknown API with no description maybe due by the end of this quarter shouldn't be a P1.
Priority: P1 → --
This is defragmenting the Marketplace and it's a Q2 goal. Will add more information as it's known, but this is indeed P1.
Priority: -- → P1
The idea/flow as I see it happening is the following:

1. The front-end will generate a feature signature for the device currently browsing the site and pass it to the api as a GET parameter called "pro" (for "profile").
2. That signature can be converted into a bit map of what features the device supports. The bit map is 1|0 of features defined in mkt.constants.features.
3. We take those features and filter apps, lining up what the device supports and what the app requires and adjust the database and elasticsearch queries removing apps that require features the device doesn't support.

This requires bug 858306 to start collecting data about what apps require.
This requires bug 862479 to be able to filter elasticsearch queries.
Depends on: 862479, 858306
Summary: [buchets] API should filter apps based on feature profile. → [buchets] Search API should filter apps based on feature profile.
OS: Windows 7 → All
Hardware: x86_64 → All
Assignee: nobody → robhudson.mozbugs
Target Milestone: --- → 2013-06-06
https://github.com/mozilla/zamboni/commit/d884f7c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: p=2
This will need some decent QA. Not that I'm not confident in the patch but because the variations involved.

I'd submit an app and set a handful of required features on it. Then play with the ?pro= query string to verify you can find it or expect it to be excluded in searches.

For example:
curl -XGET https://marketplace-dev.allizom.org/api/v1/apps/search/?q=test&pro=8a7dd46c.32.1&dev=firefoxos

Be sure to include "dev=firefoxos" or "dev=android". We do filter by profiles on desktop or when dev isn't there.

I made a way to play with feature profiles here:
http://jsfiddle.net/robhudson/9PArz/
(In reply to Rob Hudson [:robhudson] from comment #6)
> I made a way to play with feature profiles here:
> http://jsfiddle.net/robhudson/9PArz/

That is awesome.
Can you please provide STR for this bug or mark it as [qa-] if no QA verification is needed? Thank you.
Blocked on verifying this by bug 879379
You need to log in before you can comment on or make changes to this bug.