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

fix(adm): Filter keywords that do not start with the partial query #247

Merged
merged 1 commit into from
Nov 26, 2021

Conversation

ncloudioj
Copy link
Contributor

@ncloudioj ncloudioj commented Nov 25, 2021

This fixes #242.

Those suggestions, reported in #242, all have a wide range of targeting keywords, e.g

[
  "cars eb",
  "cars eba",
  "cars ebay"
  "eb",
  "eba",
  "ebay",
  ...
]

Hence, we need to filter out those keywords that don't share the same prefix with the search query (e.g. "eb") when trying to extract the full keyword.

@ncloudioj ncloudioj requested a review from a team as a code owner November 25, 2021 19:35
Copy link
Contributor

@Dexterp37 Dexterp37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Where is the same implementation that lives in Firefox?

@ncloudioj
Copy link
Contributor Author

This looks good to me. Where is the same implementation that lives in Firefox?

Here it is: https://searchfox.org/mozilla-central/source/browser/components/urlbar/UrlbarQuickSuggest.jsm#160

@Dexterp37 Thanks for the review!

@ncloudioj ncloudioj merged commit d166f66 into main Nov 26, 2021
@ncloudioj ncloudioj deleted the gh-242 branch November 26, 2021 14:25
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 this pull request may close these issues.

Multiple Merino suggested keywords don't match with the typed keyword
2 participants