-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zephyr doc website: Delay search in /boards to the end of the search. #16935
Comments
Thanks for pointing this out. Alas, we don't have this level of control over the Sphinx-generated search results via any settings, but we might be able to introduce a tweak to accomplish pushing the boards later in the search results (the search results seem to be sorted by filename path where the hit is found). I'll look into this. We once looked at replacing the site search with a customized google search, so searching for "i2c" would show something more like this: https://www.google.com/search?q=site%3Azephyrproject.org+i2c |
Yeah that's what I was supposing. Thought, I think the problem is worth investigating, as it is a real drawback of the current doc system. You usually don't know where to find things, so an efficient search functionality is really a plus.
Would be great, thanks for checking this! |
@dbkinder feel free to close. |
After further review, the call on the field is reversed. There is indeed a way to tweak the search scoring function to do what we want, and I've submitted a PR #21312 to do just that. |
All docs are treated equally in the search results. The built-in search system knows to emphasize hits in titles and object names, but could use some help understating hits in non-definitive docs. In particular, hits to docs in the /boards, /samples, and /reference/kconfig docs are often not as important as hits in other docs, so let's push them later in the search result output. We can tweak the search results scoring (and thereby the order of display) via the ``html_search_scorer`` setting in ``conf.py`` along with a piece of JavaScript to adjust the result score. Fixes: #16935 Signed-off-by: David B. Kinder <[email protected]>
Is your enhancement proposal related to a problem? Please describe.
When using search functionality in Zephyr Project Documentation, board/ directory hits are reported first. Though in general, this is not in board files that we can get insightful information on Zephyr.
Besides, some generic terms (west, i2c, ...) hit in all boards so we need to go after >100 of hits before getting the result we're looking for.
Describe the solution you'd like
Delay search in /boards to the end of the search.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or graphics (drag-and-drop an image) about the feature request here.
The text was updated successfully, but these errors were encountered: