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

Add boosted_category_id column and add to Algolia index. #748

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

richardxia
Copy link
Member

This adds a boosted_category_id column to Services, which is a nullable foreign key to the Categories table. This is intended to be used by the frontend code through Algolia as a possible target of the optional filters feature of Algolia, allowing us to boost search rankings for specific services on specific pages.

This column is added to the Algolia index as boosted_category, which holds the string name of the category, and we also add it to the attributesForFaceting list so that it can be used for optional filters.

Finally, we change the Algolia index ranking order from its default by placing geo after filters. This is needed in order for optional filters to have higher precedence than geolocation.

This adds a `boosted_category_id` column to Services, which is a
nullable foreign key to the Categories table. This is intended to be
used by the frontend code through Algolia as a possible target of the
optional filters feature of Algolia, allowing us to boost search
rankings for specific services on specific pages.

This column is added to the Algolia index as `boosted_category`, which
holds the string name of the category, and we also add it to the
`attributesForFaceting` list so that it can be used for optional
filters.

Finally, we change the Algolia index ranking order from its default by
placing `geo` after `filters`. This is needed in order for optional
filters to have higher precedence than geolocation.
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.

pretty cool, thanks for getting this done!

@richardxia richardxia merged commit 3a9c0af into master Aug 15, 2024
4 checks passed
@richardxia richardxia deleted the add-boosted-category-column branch August 15, 2024 00:23
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