Skip to content

Conversation

@ntjohnson1
Copy link
Member

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.

Screenshot 2025-11-21 at 2 32 24 PM

@ntjohnson1 ntjohnson1 added 📖 documentation Improvements or additions to documentation deploy docs Once this PR is merged to main, the resulting commit will be cherry-picked to docs-latest labels Nov 21, 2025
@github-actions
Copy link

Your changes can be cherry-picked to docs-latest and will be deployed
immediately after merging.

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;'
Copy link
Member

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;'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Member Author

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.

@ntjohnson1 ntjohnson1 merged commit 03734ca into main Nov 21, 2025
34 checks passed
@ntjohnson1 ntjohnson1 deleted the nick/python_doc_search_better branch November 21, 2025 20:04
rerun-bot pushed a commit that referenced this pull request Nov 21, 2025
### 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"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy docs Once this PR is merged to main, the resulting commit will be cherry-picked to docs-latest 📖 documentation Improvements or additions to documentation include in changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants