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

Boost service discovery (tile) results based on boosted category. #1392

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

richardxia
Copy link
Member

In order to surface some specific results on the tile results page, we make use of an optional filter on a newly added Algolia index property.

On the backend, we've created a new column, boosted_category, which we can optionally set on each Service. This allows us perform an optional filter only on the tile results pages, and not the general search page, where services that match the optional filter are boosted in ranking.

For now, there can only be one boosted_category per service, but this is sufficient for the current use case, where only two services need to be boosted, and they each only apply to one category.

Copy link
Contributor

@schroerbrian schroerbrian left a comment

Choose a reason for hiding this comment

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

only one comment about a console.log.
nice work! it's great to finally have this implemented

// Our Algolia plan only allows for up to one optional filter, so just
// drop all but the first.
.slice(0, 1);
console.log(configureProps);
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you intend to leave in this console.log?

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoops, nice catch! Just removed it in 46d2ceb.

@richardxia
Copy link
Member Author

It looks like I'm failing CI because GitHub Actions removed support for the old version of docker-compose, and the new one is just a subcommand of the docker command: https://github.com/orgs/community/discussions/116610

Let me fix that in a separate PR, since I don't want to mix random infra changes with this PR.

In order to surface some specific results on the tile results page, we
make use of an optional filter on a newly added Algolia index property.

On the backend, we've created a new column, `boosted_category`, which we
can optionally set on each Service. This allows us perform an optional
filter only on the tile results pages, and not the general search page,
where services that match the optional filter are boosted in ranking.

For now, there can only be one `boosted_category` per service, but this
is sufficient for the current use case, where only two services need to
be boosted, and they each only apply to one category.
@richardxia richardxia force-pushed the add-optional-filter-on-boosted-category branch from 46d2ceb to ae58299 Compare August 15, 2024 00:45
@richardxia richardxia merged commit 6817ee3 into master Aug 15, 2024
5 checks passed
@richardxia richardxia deleted the add-optional-filter-on-boosted-category branch August 15, 2024 00:51
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.

2 participants