You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... the problem doesn't occur with the mkdocs or readthedocs themes
... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
... the documentation does not mention anything about my problem
... there are no open or closed issues that are related to my problem
Description
Search boosting is not being applied to section entries on the page.
Expected behaviour
When a boost is applies to a page, all content on the page receives the boost.
Actual behaviour
Only the entry for entire page receives the boost. Entries for the individual sections of the page don't receive the boost.
Steps to reproduce
Add search boosting to a page that has multiple sections (h2 headers).
Build the doc.
Look at search_index.json.
Only the entry corresponding to the entire page will have the boost. The entries corresponding to sections of the page will not.
Looking at the code, the boost is only applied to a single entry, but the search plugin generates multiple ones. A solution may involve searching over all of the entries for ones that point to the same page, and applying the boost to all of them.
Fixed in 922fde0. Boosts are now applied to all sections of a document. This still needs to be merged into Insiders, which will take a little more time given the difference search implementation. I'll follow up shortly.
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
Search boosting is not being applied to section entries on the page.
Expected behaviour
When a boost is applies to a page, all content on the page receives the boost.
Actual behaviour
Only the entry for entire page receives the boost. Entries for the individual sections of the page don't receive the boost.
Steps to reproduce
search_index.json
.Only the entry corresponding to the entire page will have the boost. The entries corresponding to sections of the page will not.
Looking at the code, the boost is only applied to a single entry, but the search plugin generates multiple ones. A solution may involve searching over all of the entries for ones that point to the same page, and applying the boost to all of them.
mkdocs-material/src/plugins/search/plugin.py
Lines 45 to 67 in f13a552
Package versions
Configuration
N/A
System information
N/A
The text was updated successfully, but these errors were encountered: