Skip to content

Unify dashes and underscores in search #1101

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

Closed
phil-opp opened this issue Oct 16, 2020 · 2 comments
Closed

Unify dashes and underscores in search #1101

phil-opp opened this issue Oct 16, 2020 · 2 comments
Labels
A-backend Area: Webserver backend A-crate-search Area: A problem or feature request for searching crates C-enhancement Category: This is a new feature

Comments

@phil-opp
Copy link

The docs.rs search function doesn't always unify dashes and underscores right now. For example, a search for serde-j yields crates like serde-json-core or tokio-serde-json-mirror , but not the serde_json crate. The search on crates.io does not seem to have this problem.

(Originally reported on internals.rust-lang.org).

@Kixiron
Copy link
Member

Kixiron commented Oct 16, 2020

This could be solved with nothing more than a query.replace('-', '_') (as much as I don't like the allocation), but the behavior looks stranger than that so I'll investigate to see if that actually helps things any

@jyn514 jyn514 added A-backend Area: Webserver backend A-crate-search Area: A problem or feature request for searching crates C-enhancement Category: This is a new feature labels Oct 16, 2020
@jyn514
Copy link
Member

jyn514 commented Nov 13, 2021

Fixed by #1521.

@jyn514 jyn514 closed this as completed Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend Area: Webserver backend A-crate-search Area: A problem or feature request for searching crates C-enhancement Category: This is a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants