Skip to content

Bug 1839487 Add new suggested_index columns to quicksuggest - #786

Open
0c0w3 wants to merge 1 commit into
mozilla-services:mainfrom
0c0w3:Bug-1855338-quicksuggest_suggested_index
Open

Bug 1839487 Add new suggested_index columns to quicksuggest#786
0c0w3 wants to merge 1 commit into
mozilla-services:mainfrom
0c0w3:Bug-1855338-quicksuggest_suggested_index

Conversation

@0c0w3

@0c0w3 0c0w3 commented Sep 27, 2023

Copy link
Copy Markdown

https://bugzilla.mozilla.org/show_bug.cgi?id=1855338

Checklist for reviewer:

For glean changes:

  • Update templates/include/glean/CHANGELOG.md

For modifications to schemas in restricted namespaces (see CODEOWNERS):

@auto-assign
auto-assign Bot requested a review from akkomar September 27, 2023 02:48
@0c0w3

0c0w3 commented Sep 27, 2023

Copy link
Copy Markdown
Author

cc @ncloudioj @quiiver, thanks

@akkomar
akkomar requested review from quiiver and removed request for akkomar September 27, 2023 12:28

@ncloudioj ncloudioj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

"description": "The source of the suggestion, either “remote-settings” or “merino”. See bug 1839487",
"type": "string"
},
"suggested_index": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the reason for having this be non-relative when we already have the global position field?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's helpful to consider a couple different uses of "relative":

  1. suggested_index can be relative to the Firefox Suggest group (suggested_index_relative_to_group = true) or to the whole results list (suggested_index_relative_to_group = false), although the latter might also be referred to as "global" or "non-relative"
  2. suggested_index can be relative the beginning of the group/list or the end. Positive values are relative to the beginning, negative to the end

In practice suggested_index is helpful when:

  • It's relative to the Firefox Suggest group, or
  • It's relative to the end of the results list

In contrast, if it's relative to the start of the results list, then it's practically the same as position, modulo the different bases (1-based vs. 0-based). The only time it would be really different is when there are fewer results in the list than the suggested index, e.g. there are only 3 results but the suggested index is 9. But in practice we never use large suggested indexes relative to the whole list. We only ever use a value of 1, for top picks.

All that said, the reason we added these was to support the proposed second treatment branch of higher-placement sponsored suggestions where they're shown at the top of the Suggest section. We would be able to distinguish that case by checking suggested_index = 0 and suggested_index_relative_to_group = true. In general we'd be able to distinguish any other placements we'd want to experiment with. Now that we aren't doing that second branch, at least not right now, we don't actually need these values and so we could just remove them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants