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
Augment pages with custom ranking and/or a featured flag? #79
Comments
Hello and thanks for the feature request. What you're suggesting could be achieved with the current plugin version by using some custom front-matter as well as custom Algolia index settings. For example, you could add to every page you want featured a Then, you would have to edit your The default settings for the custom ranking used by the plugin are defined here and use the date, weight of the header and position in the page by default. You can overwrite them in your algolia:
settings:
customRanking:
- desc(featured)
- desc(date)
- desc(custom_ranking.heading)
- asc(custom_ranking.position) This will put featured pages matching your keywords before other pages. You can use either boolean or numeric values for the customRanking and it will be taken into account. Note that the ranking in Algolia uses a tie-breaking algorithm when dealing with customRanking (written documentation, video) that might be a bit confusing at first if you're more used to coefficient based ranking. Hope that helps :) |
That's exactly what I'm looking for!! As an FYI, I couldn't figure this out from the documentation. The way you describe it is crystal clear. |
Thanks for the feedback. I'll add a note to add your question to the FAQ, then :) |
I want to suggest a feature:
I'd like to easily augment my pages with custom ranking and a featured flag.
What is your use case for such a feature?
I want to control what pages appear first. I want to do this both explicitly by rank as well as by adding a post tag.
The text was updated successfully, but these errors were encountered: