rust-lang / rust-lang/rust

rustdoc search: for argument based searches, deprioritize associated items

Open
#134,936 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-rustdoc-search A-type-based-search C-enhancement T-rustdoc T-rustdoc-frontend
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Inspired by discussion on https://github.com/rust-lang/rust/pull/131806, opening an issue so it can be discussed separately.

currently, both "In Parameters" and "Type ->" searches are dominated by methods on that type (and if the aforementioned PR is merged, fields will also clutter such searches)

however, associated items for a type can easily be viewed simply by going to that type's page, so arguably this form of search should prioritize free functions and methods of other types, which are harder to find.

this could be considered the dual of https://github.com/rust-lang/rust/issues/134935

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the discussion in pull request 131806 and the dual issue 134935 to understand the intended search-ranking behavior. Then locate the rustdoc search implementation and its ranking tests. Done means argument-based searches no longer let associated items dominate, while free functions and methods on other types are prioritized.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.