-
-
Notifications
You must be signed in to change notification settings - Fork 541
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
Update pagefind
to version 1.1.0
#1750
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
* main: (74 commits) Add type checking job to the CI workflow (withastro#1827) [ci] format i18n(pt-BR): Update `components.mdx` (withastro#1815) [ci] format i18n(ru): update translations (withastro#1825) i18n(pt-BR): Update `css-and-tailwind.mdx` (withastro#1817) i18n(es): updates `pages` (withastro#1823) i18n(es): update `i18n` (withastro#1822) i18n(es): updates `overrides` (withastro#1820) i18n(es): update `guides/components` and add `syncKey` to various pages (withastro#1818) [ci] format i18n(es): update `community-content` (withastro#1824) i18n(es): update `configuration` (withastro#1821) i18n(es): update `frontmatter` (withastro#1819) i18n(fr): update `guides/pages.mdx` (withastro#1800) i18n(fr): update `reference/overrides.md` (withastro#1803) i18n(fr): update `reference/frontmatter.md` (withastro#1802) i18n(fr): update `reference/configuration.mdx` (withastro#1801) i18n(fr): update `guides/i18n.mdx` (withastro#1799) i18n(fr): update `guides/components` and add `syncKey` to various pages (withastro#1797) ...
Following #1751 which rewrites Query:
Query:
Query:
Query:
Query:
Query:
Query:
Query:
Query:
Query:
I think the effect of #1751 is clearly beneficial. Regarding the pagefind update itself now, with the explanation in the initial post of this PR and the current result for queries like I'm still a bit unsure about some results like for the Would love to get some opinions on this. |
What kind of changes does this PR include?
Description
This pull request is a draft to update the
pagefind
version to the recently released version1.1.0
.The major changes include improvements to the result ranking algorithm to align with BM25 and the abitity to configure the ranking algorithm.
The PR does not include any change to the ranking configuration so far but I think we would end up with some slight changes but I want to play more with the new options. Nevertheless, I wanted to post some preliminary results.
Configuration
Of the new ranking algorithm configuration options, I think the term frequency may be one of the most important to play with.
1.0
which means the term frequency is the main factor in the ranking.0
means the term frequency is not considered in the ranking.Basically, a higher value will tend to favor short pages while a lower value will do the opposite as longer pages are penalized for having a way lower term frequency.
Found out that the next version of git-scm.com is also planning to use
0
to not favor short pages (I think this led the initiative to add these options topagefind
).Page results comparison
The following tables shows page ranking comparison between the current version, the new version with the default term frequency and the new version with a term frequency of
0.5
and0
.Note that the "Sidebar Navigation" guide is often an outlier as the examples mimic the Starlight documentation structure which pollutes the results. This will be addressed in another PR.
Query:
setup
0.5
term frequency0
term frequencyQuery:
installation
0.5
term frequency0
term frequencyQuery:
page
0.5
term frequency0
term frequencyQuery:
markdown
0.5
term frequency0
term frequencyQuery:
component
0.5
term frequency0
term frequencyQuery:
CSS
0.5
term frequency0
term frequencyQuery:
language
0.5
term frequency0
term frequencyQuery:
sidebar
0.5
term frequency0
term frequencyQuery:
lastUpdated
0.5
term frequency0
term frequencyQuery:
plugin
0.5
term frequency0
term frequency