-
Notifications
You must be signed in to change notification settings - Fork 578
Make python api doc search match more things #11946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Your changes can be cherry-picked to |
| plugins: | ||
| - search # https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/ | ||
| - search: # https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/ | ||
| separator: '[\s\-,:!=\[\]()"/_]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, how simple!
| plugins: | ||
| - search # https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/ | ||
| - search: # https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/ | ||
| separator: '[\s\-,:!=\[\]()"/_]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| separator: '[\s\-,:!=\[\]()"/_]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;' | |
| separator: '[\s\-,:!=\[\]()"/_]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;' # Don't just match whole-words |
maybe?
or just add a link to explain that monstrosity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied that blob from the mkdocs-material page and inserted the _ to the separator list. Adding a comment to that effect.
### Related #11902 ### What Our python search by default looked for perfect matches which is 😠. This does a lazy improvement to at least split things along various characters to make it easier to match approximately. There are other features we could continue to tweak if necessary (or could overhaul with a better external search support index). I still don't really know how to get our python api docs to update besides releasing a new version so run `pixi run py-docs-serve` locally and see that we now math the motivating issue (or trust me). I also added a share link so I can refer to searches in the future without screenshots. <img width="762" height="746" alt="Screenshot 2025-11-21 at 2 32 24 PM" src="https://github.com/user-attachments/assets/4b02bbc7-5735-4ed6-948d-5c1e2664c2bd" />
Related
#11902
What
Our python search by default looked for perfect matches which is 😠. This does a lazy improvement to at least split things along various characters to make it easier to match approximately. There are other features we could continue to tweak if necessary (or could overhaul with a better external search support index).
I still don't really know how to get our python api docs to update besides releasing a new version so run
pixi run py-docs-servelocally and see that we now math the motivating issue (or trust me).I also added a share link so I can refer to searches in the future without screenshots.