Closed
Bug 983616
Opened 11 years ago
Closed 11 years ago
[Search] Pass in region for faster marketplace searches
Categories
(Firefox OS Graveyard :: Gaia::Search, defect, P2)
Firefox OS Graveyard
Gaia::Search
Tracking
(Not tracked)
RESOLVED
FIXED
2.0 S2 (23may)
People
(Reporter: kgrandon, Assigned: kgrandon)
References
Details
(Keywords: perf, Whiteboard: [c= p=1 s= u=],[systemsfe])
Attachments
(1 file)
Some notes from :mat in bug 978736:
One thing you can do right now is specifying the region in the querystring, or "region=None" to disable region filtering completely. I'm on IRC if you want to discuss this because it's complex. Quick summary: Right now, without that parameter, we are going through geoip to try to find your region and filter accordingly.
If you want to pass the region, here is what we are doing on the Marketplace front-end: https://github.com/mozilla/fireplace/blob/master/hearth/media/js/mobilenetwork.js (at the moment you can ignore the carrier parameter - we don't currently filter with it)
If you want to disable it, passing region=None, be aware that the apps you'll get might not be available for the user (either because it requires payments - which can be impossible for their region - or simply because the developer has chosen to exclude the app from their region)
Comment 1•11 years ago
|
||
This will no longer be necessary when bug 915701 is finished (the filtering on region will be gone entirely from the API).
Since Rocketbar currently leads you to the Marketplace, it's probably acceptable to have the autosuggest return apps that are potentially unavailable in your region - the Marketplace app will show the user that the app is not available.
Assignee | ||
Comment 2•11 years ago
|
||
Since bug 915701 is now resolved, it seems that we may not need to solve this.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 3•11 years ago
|
||
Sorry, I just been doing some more tests, and found out that you actually need to pass the region for now.
The reason is, even though I removed region filtering for this API, if you don't pass a region when making an API call, we systematically call geoip even if it's not necessary.
TL;DR: pass region=restofworld in the query string, it will help performance.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Priority: -- → P2
Assignee | ||
Comment 4•11 years ago
|
||
Mat - quick question. I'm looking at how to do this from the gaia side and not entirely sure.
Can we pass in a mcc value from the sim card? I'm not finding an easy-to-access "region name" in gaia like "en", "uk", and it loooks like this is what you're expecting? Thanks!
Flags: needinfo?(mpillard)
Comment 5•11 years ago
|
||
We do mcc->region conversion on the client side, the API doesn't know about it. But it shouldn't matter, just use region=restofworld, the filtering is already off, it's just to avoid the geoip request (see comment 3)
Flags: needinfo?(mpillard)
Assignee | ||
Comment 6•11 years ago
|
||
Guess we should start fixing some search bugs, taking :)
Assignee: nobody → kgrandon
Status: REOPENED → ASSIGNED
Target Milestone: --- → 2.0 S2 (23may)
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Whiteboard: [c= p= s= u=] → [c= p=1 s= u=],[systemsfe]
Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 8421254 [details] [review]
Github pull request
Hey Mat/Dale - have a sec to take a look at this? Thanks!
Attachment #8421254 -
Flags: review?(mpillard)
Attachment #8421254 -
Flags: review?(dale)
Comment 9•11 years ago
|
||
Comment on attachment 8421254 [details] [review]
Github pull request
r+ and merged as its a minor change
https://github.com/mozilla-b2g/gaia/commit/7a5ab0709189556f9b212126d41c052b26e98ae7
Attachment #8421254 -
Flags: review?(dale) → review+
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 10•11 years ago
|
||
Comment on attachment 8421254 [details] [review]
Github pull request
Thanks! Mat - if you have any follow-up comments/concerns please let me know.
Attachment #8421254 -
Flags: review?(mpillard)
Assignee | ||
Comment 11•11 years ago
|
||
Oh oops - I saw that I still had a pull request open, but landed this anyway after it was landed. I don't think anything bad happens, but another commit may or may not be here: https://github.com/mozilla-b2g/gaia/commit/7a68501f3aeee0b7bbcfb2185a879bdadac26772
You need to log in
before you can comment on or make changes to this bug.
Description
•