Closed Bug 1771427 Opened 3 years ago Closed 3 years ago

Support non-unique keywords in the quick suggest remote settings data

Categories

(Firefox :: Address Bar, task, P1)

task
Points:
3

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox102 --- fixed
firefox103 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

(Whiteboard: [snt-triaged])

Attachments

(1 file)

As part of the offline expansion, the keywords of suggestions in our own dataset may be the same as keywords used by partner datasets. Currently we assume keywords and suggestions are one-to-many, so we need to add support for keywords that are shared by multiple suggestions.

It's pretty straightforward to support non-unique keywords. Right now, each
keyword maps to a single result object in the _resultsByKeyword map. In this
revision, keywords that are used in only one result are still stored in
_resultsByKeyword by mapping the keyword to the result object, but keywords
that are used in multiple results are stored by mapping them to an array of the
result objects. The reason for not always using an array is to save memory;
please see the new comment above _resultsByKeyword for more.

Then, we need to modify query() so that all the matching suggestions are
returned. The provider also needs to be modified so it expects an array of
suggestions instead of only one.

Blocks: 1771537
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c65ea30df849 Support non-unique keywords in the quick suggest remote settings data. r=daisuke
Flags: qe-verify-
Flags: in-testsuite+

Comment on attachment 9278425 [details]
Bug 1771427 - Support non-unique keywords in the quick suggest remote settings data.

Beta/Release Uplift Approval Request

  • User impact if declined: This is necessary sooner rather than later for the Firefox Suggest offline expansion feature/experiment.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a minor architectural change for Firefox Suggest with no visible user-facing consequences.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9278425 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch

Comment on attachment 9278425 [details]
Bug 1771427 - Support non-unique keywords in the quick suggest remote settings data.

Approved for 102 beta 3, thanks.

Attachment #9278425 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: