Teach the Rust component about the weather trigger keywords
Categories
(Application Services :: Suggest, task)
Tracking
(Not tracked)
People
(Reporter: lina, Assigned: adw)
References
Details
(Whiteboard: [disco])
For weather suggestions, we store all the keywords that should trigger a call to Merino's AccuWeather provider in a single weather
record. The Rust component currently ignores this record; however, Desktop's weather provider relies on it, and so this bug blocks Desktop from switching over to the Rust component backend for Quick Suggest. This bug tracks teaching the Rust component about that record.
The weather
record looks like this (check out https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/quicksuggest/records/weather
for the latest):
{
"type": "weather",
"schema": 1683294047906,
"weather": {
"keywords": [
"weather",
"forecast",
"windy",
"humidity",
"monsoon",
"flooding",
"rain in",
"storms",
"storm in",
"forcast",
"wether",
"wather",
"weahter",
"weater",
"weaher",
"vindy"
],
"min_keyword_length": 3,
"min_keyword_length_cap": 6
},
"id": "weather",
"last_modified": 1683313881574
}
Since this record is so small, and read all at once, it could make sense to store this configuration in the meta
table.
For exposing the weather keywords to clients, I could see us having a more generic configuration interface, like:
[Enum]
interface SuggestionProviderConfig {
Weather(sequence<string> keywords, i32 min_keyword_length, i32 min_keyword_length_cap);
};
interface SuggestStore {
[Throws=SuggestApiError]
SuggestionProviderConfig? fetch_configuration(SuggestionProvider provider);
};
Alternatively, we could have a method specifically for fetching weather configuration:
dictionary SuggestWeatherConfig {
sequence<string> keywords;
i32 min_keyword_length;
i32 min_keyword_length_cap;
};
interface SuggestStore {
[Throws=SuggestApiError]
SuggestWeatherConfig? fetch_weather_config();
};
Updated•5 months ago
|
Reporter | ||
Comment 1•5 months ago
|
||
Drew volunteered to take this in our check-in meeting. Thanks!
Reporter | ||
Comment 2•5 months ago
|
||
For exposing the weather keywords to clients, I could see us having a more generic configuration interface, like:
Drew also pointed out that we have frequency caps (in the firefox-suggest-configuration
record), so a generic configuration interface sounds like it'll make a lot of sense. We can get another bug on file to add that.
Assignee | ||
Updated•5 months ago
|
Assignee | ||
Updated•5 months ago
|
Description
•