Skip to content

Improve ranking of exact matches in page titles #437

@hirasso

Description

@hirasso

Hi there,

we just updated pagefind to 1.0.2 for the docs for swup and it's amazing! Thanks for all your work on this project.

Playing around with it, I noticed something that might or might not be possible to generalize: When I search for "Plugins", I'm getting the following results:

image

Intuitively I'd think that a page who's main heading (h1) exactly matches the search term ("Plugins", highlighted in the screenshot above) should be rated highest. Sure it's possible for us to manually give the "plugins" page a very high rating – but maybe there is a way for pagefind to get smart enough to return pages with an exact match in the main heading first?

I'd be happy to hear your opinion on that before we start implementing manual ranking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions