Docs search improvement#3179
Merged
reynaldichernando merged 4 commits intoMay 28, 2026
Merged
Conversation
Member
Author
|
bruh |
Member
Author
|
😎 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the docs site search by moving from manual page-wide substring matching to a MiniSearch-backed index with fuzzy/prefix matching and section-aware results (including section anchors and optional text-fragment navigation).
Changes:
- Replace client-side linear search with MiniSearch (fuzzy + prefix + AND-combined terms) and updated result rendering (Page Title › Section).
- Change search indexing in
build.jsfrom whole-page plain text to per-section documents and serialize as a MiniSearch index (toJSON()). - Add minimal UI styling for the new “Page Title › Section” result format and include
minisearchas a dependency.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/docs/src/assets/js/search.js | Loads a serialized MiniSearch index, performs fuzzy/prefix searches, and builds anchor/text-fragment result URLs with updated UI rendering. |
| src/docs/build.js | Builds a section-based docs corpus and outputs a serialized MiniSearch index for the frontend to load. |
| src/docs/src/assets/css/style.css | Adds styling for page-title prefix and separator in search results. |
| src/docs/package.json | Adds minisearch dependency for docs build + frontend bundle. |
| package-lock.json | Locks the new dependency and associated lockfile changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+188
to
+189
| // Index hasn't finished loading yet; show empty state. | ||
| updateSearchResults([]); |
Member
Author
There was a problem hiding this comment.
probably a good idea for an issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #2362
notes: