Skip to content

Explore Pagefind result ranking to improve search relevance #2872

@MoshiMoshiMochi

Description

@MoshiMoshiMochi

Please confirm that you have searched existing issues in the repo

Yes, I have searched the existing issues

Any related issues?

#205

What is the area that this feature belongs to?

No response

Is your feature request related to a problem? Please describe.

Currently, MarkBind's Pagefind integration uses all default settings for search result ordering. For content-heavy instructional websites (the primary use case for MarkBind), the default ranking may not produce optimal results for user searches.

Describe the solution you'd like

Explore and implement configuration options to customize the current Pagefind's search behaviour to best fit our current purpose by exploring parameters like termFrequency, termSimilarity, pageLength, and termSaturation.

We can explore how we want to rank these pages within our results,
e.g.

  1. What pages should be prioritized? Longer pages vs. shorter pages (page length)
  2. How does typos affect a search result's relevance? (term similarity)
    etc

Here is a blog on how algolia tackles this problem, we can use it as a guideline to help us

Describe alternatives you've considered

No response

Additional context

Here are other potential pagefind features that could be useful for this issue:

  1. Weighting
  2. Sorting

Use the playground environment pagefind provides to test out how each ranking parameter affects the search results here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions