[Search Consolidation] Modify the BundledSearchEnginesStorage class to call SearchEngineSelector API and utilize it's results.
Categories
(Firefox for Android :: Search, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox139 | --- | fixed |
People
(Reporter: skhan, Assigned: harrisono)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][group3][search-consolidation])
Attachments
(1 file, 3 obsolete files)
Task : Update the BundledSearchEnginesStorage class, specifically add a new function similar to the load function to take in a SearchUserEnvironment as input. This will involve creating a SearchUserEnvironment inside this method and using the SearchEngineSelector API to get search engine data. Will also involve adding subsequent function calls.
Cuurently the load function is designed to use list.json.
Something like
override suspend fun load(
region: RegionState,
locale: Locale,
distribution: String?,
searchExtraParams: SearchExtraParams?,
coroutineContext: CoroutineContext,
): SearchMiddleware.BundleStorage.Bundle = withContext(coroutineContext) {
val searchUserEnvironment = SearchUserEnvironment(
locale = locale.toString(),
region = region.toString(),
update_channel = SearchUpdateChannel.Default,
distribution_id = distribution ?: "",
experiment = "", // Assuming empty or from parameters
app_name = SearchApplicationName.Firefox,
version = "" // Assuming empty or from parameters
)
// Call the SearchEngineSelector API with the created environment
val refinedSearchConfig = SearchEngineSelector.filterEngineConfiguration(searchUserEnvironment)
// Process refinedSearchConfig further...
}
The SearchEngineSelector API is defined here : https://github.com/mozilla/application-services/blob/39404c8d2a284aadde38a0e638a4d7b557aa55a8/components/search/src/selector.rs#L57
Note: This seems to be the most likely place according to me where the API needs to get called and results need to be utilized. But will discuss with [:zmckenney] and [:hoglesby] and confirm if we are taking this route.
Updated•10 months ago
|
This task is dependent on how we plan to call the API.
SPIKE for that is bug 1945638
| Assignee | ||
Updated•10 months ago
|
Closed the Spike bug 1945638. Unblocks this task.
| Assignee | ||
Comment 3•9 months ago
|
||
Something we agreed upon in slack
From harrisono
11:58 AM
Hey Sarah,
I’m starting to get back onto the ticket to callSearchEngineSelectorand I’m wondering if I should change the direction of this a bit.
I’m thinking that maybe instead of modifyingBundledSearchEngineStorageto read fromSearchEngineSelector, I should make a new “SearchEngineStorage” to read fromSearchEngineSelectorand add it toSearchMiddleware.
This way we can still keep the oldBundledSearchEngineStoragein case of problems and we can roll this new search engine paradigm out as an experiment/staged rollout. I think you already have a ticket for something like this.
Also I think that this work would be on top of this PR https://phabricator.services.mozilla.com/D238063 so I’ll build on top of it.
| Assignee | ||
Comment 5•8 months ago
|
||
| Assignee | ||
Updated•8 months ago
|
| Assignee | ||
Comment 6•8 months ago
|
||
WIP DO NOT LAND AS IS
| Assignee | ||
Comment 7•8 months ago
|
||
Updated•8 months ago
|
Comment 9•8 months ago
|
||
| bugherder | ||
Updated•5 months ago
|
Description
•