-
Notifications
You must be signed in to change notification settings - Fork 37
Description
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
- Go to Renovate's docs site.
- Search for
dependencyDashboard. - The precise match for
dependencyDashboardis not the first result. - I would expect the precise match
dependencyDashboardto sort higher.
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
