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.
Important
This PR presents an early preview of our new search feature for gathering user feedback. It is not yet ready for production and is subject to modifications. Currently, it lacks support for search suggestions and does not cater to Japanese, due to the absence of segmentation functionality.
Overview of this PR
This PR offers a sneak peek at our revamped search functionality. While still in development and devoid of UI changes (for now), it marks a departure from the current implementation. Unlike the existing system that forms a union of all query terms, this new approach leverages an intersection. We are eager to know whether you find this change enhances or diminishes the search results. To illustrate, here's a comparative example:
master
Branchcustom
custom code
custom code annotations
While the ranking of search results remains unchanged, the introduction of more terms now leads to fewer results, contrary to the prior behavior that yielded more results. Our tests indicate this approach significantly improves the typeahead experience. This overhaul was a substantial effort, as rewriting a codebase with thousands of lines (Lunr.js + extensions) from scratch is no small feat.
Your feedback is essential πββοΈ
We want to co-create the search feature with our community. Our goal is to deliver an unparalleled search experience to all Material for MkDocs users, not just our sponsors. This journey begins with a revamped interface and, more critically, heightened accuracy to help users find what they need quickly and effortlessly. After establishing a solid foundation, we will explore many exciting extensions, which, as always, will first be released exclusively to our sponsors. But first, we aim to elevate the experience for everyone.
To test this version featured in the PR, you can install it using
pip
:We warmly invite you to share your honest feedback on this PR! Please note that this PR is specifically designed for feedback collection and will not be merged. Your insights are invaluable to us!βΊοΈ