Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1839487 Add new suggested_index columns to quicksuggest #786

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@
"description": "The source of the suggestion, either “remote-settings” or “merino”. See bug 1839487",
"type": "string"
},
"suggested_index": {
Copy link
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
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.

"description": "The intended index of the QuickSuggest suggestion. If `suggested_index_relative_to_group` is true, the index is relative to the Firefox Suggest group; otherwise the index is relative to the entire list of suggestions. Non-negative values (starting at 0) are relative to the start/top of the group/list; negative values are relative to the end/bottom of the group/list.",
"type": "integer"
},
"suggested_index_relative_to_group": {
"description": "Whether `suggested_index` is relative to the Firefox Suggest group. If false, it is relative to the entire list of suggestions.",
"type": "boolean"
},
"version": {
"description": "Firefox version",
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@
"description": "The source of the suggestion, either “remote-settings” or “merino”. See bug 1779049",
"type": "string"
},
"suggested_index": {
"description": "The intended index of the QuickSuggest suggestion. If `suggested_index_relative_to_group` is true, the index is relative to the Firefox Suggest group; otherwise the index is relative to the entire list of suggestions. Non-negative values (starting at 0) are relative to the start/top of the group/list; negative values are relative to the end/bottom of the group/list.",
"type": "integer"
},
"suggested_index_relative_to_group": {
"description": "Whether `suggested_index` is relative to the Firefox Suggest group. If false, it is relative to the entire list of suggestions.",
"type": "boolean"
},
"version": {
"description": "Firefox version",
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@
"description": "The source of the suggestion, either “remote-settings” or “merino”. See bug 1779049",
"type": "string"
},
"suggested_index": {
"description": "The intended index of the QuickSuggest suggestion. If `suggested_index_relative_to_group` is true, the index is relative to the Firefox Suggest group; otherwise the index is relative to the entire list of suggestions. Non-negative values (starting at 0) are relative to the start/top of the group/list; negative values are relative to the end/bottom of the group/list.",
"type": "integer"
},
"suggested_index_relative_to_group": {
"description": "Whether `suggested_index` is relative to the Firefox Suggest group. If false, it is relative to the entire list of suggestions.",
"type": "boolean"
},
"version": {
"description": "Firefox version",
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
"description": "The placement of the QuickSuggest link (1-based)",
"type": "integer"
},
"suggested_index": {
"description": "The intended index of the QuickSuggest suggestion. If `suggested_index_relative_to_group` is true, the index is relative to the Firefox Suggest group; otherwise the index is relative to the entire list of suggestions. Non-negative values (starting at 0) are relative to the start/top of the group/list; negative values are relative to the end/bottom of the group/list.",
"type": "integer"
},
"suggested_index_relative_to_group": {
"description": "Whether `suggested_index` is relative to the Firefox Suggest group. If false, it is relative to the entire list of suggestions.",
"type": "boolean"
},
"release_channel": {
"description": "Firefox release channel",
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
"description": "The placement of the QuickSuggest link (1-based)",
"type": "integer"
},
"suggested_index": {
"description": "The intended index of the QuickSuggest suggestion. If `suggested_index_relative_to_group` is true, the index is relative to the Firefox Suggest group; otherwise the index is relative to the entire list of suggestions. Non-negative values (starting at 0) are relative to the start/top of the group/list; negative values are relative to the end/bottom of the group/list.",
"type": "integer"
},
"suggested_index_relative_to_group": {
"description": "Whether `suggested_index` is relative to the Firefox Suggest group. If false, it is relative to the entire list of suggestions.",
"type": "boolean"
},
"reporting_url": {
"description": "The reporting URL of the ad, normally pointing to the ad partner's reporting endpoint. It's URL encoded",
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
"description": "The placement of the QuickSuggest link (1-based)",
"type": "integer"
},
"suggested_index": {
"description": "The intended index of the QuickSuggest suggestion. If `suggested_index_relative_to_group` is true, the index is relative to the Firefox Suggest group; otherwise the index is relative to the entire list of suggestions. Non-negative values (starting at 0) are relative to the start/top of the group/list; negative values are relative to the end/bottom of the group/list.",
"type": "integer"
},
"suggested_index_relative_to_group": {
"description": "Whether `suggested_index` is relative to the Firefox Suggest group. If false, it is relative to the entire list of suggestions.",
"type": "boolean"
},
"block_id": {
"description": "A unique identifier for the QuickSuggest link",
"type": "integer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"advertiser": "test-advertiser",
"block_id": 42,
"position": 9,
"suggested_index": -1,
"suggested_index_relative_to_group": true,
"iab_category": "22 - Shopping",
"locale": "en-US",
"version": "87.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"advertiser": "test-advertiser",
"block_id": 42,
"position": 9,
"suggested_index": -1,
"suggested_index_relative_to_group": true,
"reporting_url": "https://test.reporting.net/ctp?version=16.0.0&key=1598991514900100001.1&ci=15 98991514792.12747&ctag=1598291839300100006&aespFlag=altinst&ip=%IP%&ua=%UA%",
"locale": "en-US",
"version": "87.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"is_clicked": false,
"advertiser": "test-advertiser",
"position": 9,
"suggested_index": -1,
"suggested_index_relative_to_group": true,
"block_id": 42,
"reporting_url": "https://test.reporting.net/static?id=7RHzfOIWHG7kJnEYgGeuJm7vJ%3DEkiFXwxYIZjF8XgClWfC 8%2B7R4dHQ8zjmENj%3DNwxwz%2FJmdw7R4dHQfz4Z2ZfplnHG3Z5FwqgCfX4ZLafC2mfBINI9HuiF2 z4Z2ZfplnHmcux%3DcvImauiF2zfQlWfpDX7R3%2Bx%3DDuiF2zfLyy&ip=%IP%&ua=%UA%",
"locale": "en-US",
Expand Down