Skip to content

Improve documentation search fuzziness #34454

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

Open
0joshuaolson1 opened this issue Jun 24, 2016 · 6 comments
Open

Improve documentation search fuzziness #34454

0joshuaolson1 opened this issue Jun 24, 2016 · 6 comments
Labels
A-rustdoc-search Area: Rustdoc's search feature C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@0joshuaolson1
Copy link

0joshuaolson1 commented Jun 24, 2016

I'd love to see better searching. Besides the lack of search for the book itself, Search filters out some characters without telling you; e.g. C++ and [Unstable] are reasonable search terms, but the first gives false positives by using C and the second isn't indexed?

Related: the search box says that ? gives more options, but it just lists everything like a wildcard.

@steveklabnik
Copy link
Member

1 is a duplicate of #22786

@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 24, 2016
@steveklabnik steveklabnik added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed T-tools labels May 18, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Jul 25, 2017
@0joshuaolson1 0joshuaolson1 changed the title Improve documentation search Improve documentation search filter Mar 3, 2018
@0joshuaolson1
Copy link
Author

@steveklabnik Thanks, I narrowed the issue a bit.

Another example that brought me back here: searching for 'http' returns several results!

...for heap and help, which are 50% wrong.


P.S. I still don't get what the search bar's '?' for more options... tip was supposed to mean, so does that deserve an issue?

@sinkuu
Copy link
Contributor

sinkuu commented Mar 3, 2018

You can quote the word if you don't want fuzzy search. (broken on stable though)
https://doc.rust-lang.org/nightly/std/?search=%22http%22

@steveklabnik
Copy link
Member

P.S. I still don't get what the search bar's '?' for more options... tip was supposed to mean, so does that deserve an issue?

Type ? on a doc page, and you'll get a modal.

@0joshuaolson1
Copy link
Author

0joshuaolson1 commented Mar 4, 2018

Ah, that explains the 'S' too. I wouldn't have tried them outside of the text box, because the hints were inside the text box. Cool, though!

@0joshuaolson1 0joshuaolson1 changed the title Improve documentation search filter Improve documentation search fuzziness Mar 4, 2018
@QuietMisdreavus
Copy link
Member

Triage: the current rustdoc search uses basic Levenshtein edit distance when looking for items in the search index, with a maximum distance of 3 (unless the search term is a substring of the result). I'm not totally sure of other advances in fuzzy test searching, but if they can be implemented in JavaScript, we can certainly give them a shot.

@ehuss ehuss removed the T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. label Jan 18, 2022
@fmease fmease added the A-rustdoc-search Area: Rustdoc's search feature label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-search Area: Rustdoc's search feature C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants