Skip to content

Weird search result order #337

Open
Open
@HonkingGoose

Description

@HonkingGoose

What browser are you using?

Firefox

Other browser name

No response

Describe the bug

When searching on the docs site, the precise match for the dependencyDashboard config option sorts behind things like dependencyDashboardTitle. Usually a precise match sorts higher than partial matches. 🙃

Steps to reproduce

  1. Go to Renovate's docs site.
  2. Search for dependencyDashboard.
  3. The precise match for dependencyDashboard is not the first result.
  4. I would expect the precise match dependencyDashboard to sort higher.

dependencyDashboard-search-query

Additional context

Is our separator tokenization causing problems?

We changed Material for MkDocs's default search behavior (tokenization). Maybe that's related? Here's the relevant snippet from our mkdocs.yml config file:

plugins:
  - search:
      separator: '[\s\-,:!?=\[\]()<>{}"/\\]+|\.(?!\d)|&[lg]t;'

Related PRs for the separator thing:

@TWiStErRob you helped a lot before, do you want to brainstorm again? 😄

Material for MkDocs search boost feature?

Material for MkDocs has a "search boost" feature 1, but that applies to the whole page, not just a config option. They recommend starting with a low positive value first. For example:

---
search:
  boost: 2 


---

# Page title
...

Boosting the "config options docs page" probably causes other sorting issues... But I wanted to mention boosting, in case it inspires any ideas. 😄

Material for MkDocs improved search in future

The Material for MkDocs maintainer is working on better search. Right now Material uses the Lunr.js search engine. The maintainer is going to replace Lunr.js with something that's better for searching through a docs site. 2

Footnotes

  1. Material for MkDocs, search boost

  2. Material for MkDocs repo, maintainer is going to improve search

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy