Skip to content

Fix Docs search improvement: Improve fuzzy search#3106

Open
angelinazzz1809 wants to merge 4 commits into
HeyPuter:mainfrom
angelinazzz1809:improve-fuzzy-search
Open

Fix Docs search improvement: Improve fuzzy search#3106
angelinazzz1809 wants to merge 4 commits into
HeyPuter:mainfrom
angelinazzz1809:improve-fuzzy-search

Conversation

@angelinazzz1809
Copy link
Copy Markdown
Contributor

Fixes #2362

Summary

This PR improves the docs search experience by integrating Fuse.js fuzzy search and refining search result behavior.

Changes made

  • Added Fuse.js based fuzzy search
  • Improved exact match ranking
  • Added support for nearest heading jump for fuzzy matches
  • Reduced incorrect full-page highlighting behavior
  • Added heading metadata into the search index
  • Started restructuring search indexing toward section-level indexing

Current behavior

  • Exact matches and partial matches now behave more consistently
  • Fuzzy matches can jump to the nearest heading section
  • Search highlighting is more controlled and less noisy

Notes

There are still some limitations with long-word typo matching (for example certain missing-character cases), especially when indexing large page content blocks.

I also started moving toward section-level indexing as suggested in the issue discussion(related to #2599), which should further improve fuzzy matching quality and relevance ranking.

Feedback is very welcome!

In the app environment, the prompt input was initialized using `options.value`, so `defaultValue` was not reflected.

This change ensures that `defaultValue` is used when provided, while keeping backward compatibility with `options.value`.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 13, 2026

CLA assistant check
All committers have signed the CLA.

@reynaldichernando
Copy link
Copy Markdown
Member

letting you know that i'm still looking at this, please give me some time to review it
in the meantime, the other commiter yiqingzhao1216 needs to sign the CLA too, its standard for contribution 🙏

@reynaldichernando
Copy link
Copy Markdown
Member

hi @angelinazzz1809 , the PR seems to contain some merge conflict in gui/src/UI
this causes the project to not run, could you help take a look?

@angelinazzz1809
Copy link
Copy Markdown
Contributor Author

Thanks! The other account (yiqingzhao1216) is also mine — I accidentally used a different local git commit identity while pushing from my local environment, which caused the CLA mismatch. I've signed the CLA for that account as well, so it should be fully resolved now.

And I synced with the latest upstream changes and resolved the merge conflict in gui/src/UI. The PR has been updated, so it should run correctly now. Please let me know if there are still any issues.

Appreciate you taking the time to review this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs search improvement

4 participants