SearchSuggestionController should move remote results that are also in form history to the local results




4 years ago
2 years ago


(Reporter: adw, Unassigned)


Bug Flags:
firefox-backlog +

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [suggestions][bug][fxsearch])



4 years ago
In SearchSuggestionController, it's possible for suggestions that are in form history to appear in the remote results.  SearchSuggestionController should not include a suggestion in the remote results if that suggestion is also in form history.  Instead, such a suggestion should be included in the local results.

The idea of maxLocalResults and maxRemoteResults is still OK, except now they're more like hints than hard limits, because the actual number of remote results is decreased by the number of those results that appear in form history, and the actual number of local results is increased by the same number.  We don't want to remove maxLocalResults and maxRemoteResults because, for example, when a search string has lots of form history matches but none of them appear in the remote results, we should still return maxLocalResults local results and maxRemoteResults remote results.

_fetchFormHistory's autocomplete controller should resolve its promise with all the form history entries it's given.  It can't just store some subset because any entry in the set may match a remote result.  Then _dedupeAndReturnResults should be updated to dedupe the two sets as I've described.
Flags: firefox-backlog+


3 years ago
See Also: → bug 1060846
I think this might be addressed by my patch in bug 1060675.
Was it?
Flags: needinfo?(

Comment 3

3 years ago
I'll let Gavin clear his needinfo, but it doesn't look like it to me because local results are still capped before de-duping.  To fix this bug, we'd need to remove any remote results that would be returned that are also in the non-capped local results, and move them to the local results.
Flags: needinfo?(

Comment 4

3 years ago
deduping has been added - but result limit is set before dedupe.... so can show less than 10 or goal number of results...
Severity: normal → enhancement
Rank: 45
Priority: -- → P4
Whiteboard: [suggestions][bug][fxsearch]
You need to log in before you can comment on or make changes to this bug.