Skip to content

Pagefind needs to load index chunks based on the stemmed word #478

@bglw

Description

@bglw

Example:

  1. Pagefind encounters the text rebase on page A, and rebaseMerge on page B.
  2. Page A's word stems to rebas, page B's word stems to rebasemerg.
  3. A chunk boundary falls in between these words. So one chunk ends with rebas and the next starts with rebasem.
  4. A user is dropped into a search for rebase without any intermediary typing.
  5. Pagefind finds the chunks needed for rebase, and loads the rebasem* chunk.
  6. Pagefind then stems to word down to rebas and searches.
  7. Pagefind does not find page A, as that chunk was not loaded.

Solution: Swap steps 5 and 6 — searching for rebase should load chunks for rebas* instead of rebase*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions