rust-lang / rust-lang/mdBook

Display search results in order

Open
#2,519 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Search C-enhancement
Dominant language
Rust
Stars
22.2k
Forks
1.9k
Avg merge
2d 21h
Merged PRs (30d)
12

Description

Problem

Search results are not sorted in the same order they appear in the book - they seem to be sorted in random order (or maybe using some sort of heuristic for relevance). I'd find it really helpful to return search results in order - it would be easier to just see results from parts of the book I've already read and find where a term is first defined.

Proposed Solution

Display search results in the same order they appear in the book.

Notes

I initially filed this issue against the Rust book at https://github.com/rust-lang/book/issues/4188 and was told to open it here!

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 locating mdBook's search implementation and the code that produces or orders search results. Compare the current result order with the order of content in the book; done means search results consistently follow book order, with coverage for the requested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.