Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Merino Sponsored/Non-Sponsored results have extra keywords suggested #213

Closed
data-sync-user opened this issue Nov 10, 2021 · 2 comments · Fixed by #214
Closed

Merino Sponsored/Non-Sponsored results have extra keywords suggested #213

data-sync-user opened this issue Nov 10, 2021 · 2 comments · Fixed by #214
Assignees

Comments

@data-sync-user
Copy link
Collaborator

data-sync-user commented Nov 10, 2021

See also on bugzilla.

Compared to RemoteSettings counterparts, Firefox showed extra keywords in the title of the Merino suggestions.

┆Issue is synchronized with this Jira Bug
┆Epic: merino-nightly-test

@data-sync-user
Copy link
Collaborator Author

➤ Nan Jiang commented:

{
"block_id": 59,
"full_keyword": "amazon prime video",
"title": "Amazon.com - Official Site",
"url": "https://www.amazon.com/?tag=admarketus-20&ref=pd_sl_a318361095US59%YYYYMMDDHH%",
...
"score": 0.2
}For context, this is what Firefox received from Merino with the query “am“.

@data-sync-user
Copy link
Collaborator Author

➤ Michael Cooper commented:

Merino determines the full keyword as the longest search term that has the same suggestion (

let full_keyword = adm_suggestion
.keywords
.iter()
.max_by_key(|kw| kw.len())
.expect("No keywords?")
.clone();
).

Firefox uses a more complicated algorithm ( https://searchfox.org/mozilla-central/rev/a48e21143960b383004afa9ff9411c5cf6d5a958/browser/components/urlbar/UrlbarQuickSuggest.jsm#167-195 ) that aims to complete the current word, but not add anymore.

Merino’s current goal was to be the same as the existing Suggest implementation, and it is not doing that. It would be reasonable to change Merino to match Firefox’s implementation.

mythmon added a commit that referenced this issue Nov 10, 2021
Notably, this algorithm never suggests more than the rest of the current word.

Fixes #213
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants