Skip to content

Rustdoc reduce search rank for deprecated items #98759

Closed

Description

@pickfire

When user search radix the non-const which is deprecated rank higher than the non-deprecated version.

image

Would be nice to reduce rank of deprecated items in search, it appears on the first result.

It would be better if the search result show that the item is deprecated in favor of something else, and that something else have a higher ranking.

@rustbot label A-rustdoc-search C-enhancement T-rustdoc

Activity

  1. rustbot commented on Jul 1, 2022

    @rustbot
    Collaborator

    Error: Label C can only be set by Rust team members

    Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

  2. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    on Jul 1, 2022
  3. pitaj commented on Feb 3, 2023

    @pitaj
    Contributor

    @rustbot claim

  4. pitaj commented on Feb 3, 2023

    @pitaj
    Contributor

    I'd like to move forward on this. Hopefully we can get an FCP started. The prime motivation for this is to improve search results when searching for numeric constants like i32::MIN.

    Problem

    Currently, when searching for i32::MIN, the deprecated item std::i32::MIN shows up before i32::MIN in the search results, and there is no indication that std::i32::MIN is deprecated until you go to the page for std::i32::MIN:
    image

    And it's even worse if you search for just MIN, where all of the deprecated std::<num>::MIN items come up above the constants on the number types:
    image

    Resolution

    • sort deprecated items lower in the search results
    • mark deprecated items as deprecated in search results

    i32::MAX shows up above std::i32::MAX and core::i32::MAX
    image
    If just searching for min, the deprecated results show up far below other things:
    image
    one page later
    image

    And, as you can see, the "Deprecation planned" message shows up in the search results. The same is true for fully-deprecated items like mem::uninitialized:
    image

    For good measure, the radix search from the OP:
    image

  5. pitaj commented on Feb 3, 2023

    @pitaj
    Contributor

    Another example from #107629 (comment):

    image

    image

  6. added 2 commits that reference this issue on Mar 11, 2023
    7ddcddf
    8596751
  7. jsha commented on Mar 13, 2023

    @jsha
    Contributor

    Fixed by #107629.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-rustdoc-searchArea: Rustdoc's search featureC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions