-
-
Notifications
You must be signed in to change notification settings - Fork 29.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
Python 3.12 docs website search results prioritizes "what's new" instead of actual topic #119423
Comments
It might be an issue with Sphinx as well, so feel free to ping me. I remember we changed the search algorithm so this might have affected that, though I honestly don't know why the search would be different depending on the version. |
It sounds like Sphinx to me too: the 3.12 docs were created with Sphinx 7.3.7 and 3.11 with Sphinx 7.2.6 (the version is shown in the footer). Should this be reported to https://github.com/sphinx-doc/sphinx? |
Definitely yes! I'll tag the relevant maintainers for that component. |
I spent some time last night on this. Looks like there has been a change in the way Sphinx ranks the results. I changed the |
Yes we changed the ranking because other pages were affected but it appears that we did not consider thoses cases. I think we should sorting the results differently depending on the length of the title and where the match is done (like, is it at the beginning or not). Another possibility is that we incorrectly guessed the What's New asyncio because of the "title-like" section and handle it as the "principal" asyncio. I was expecting someone to open an issue meanwhile but I'll do it myself (I think it'd be best to continue the discussion on Sphinx' side). |
Just to be clear, the original code was clearly not working as intended but it appears that the bugs actually produced more desirable behaviour in some cases. I think there's a number of things we can do here, see the issue above for more discussion. |
For what it's worth, updating the docs to use the latest minor version (7.4.x) of Sphinx should improve the results here somewhat. Give it a try! |
The current docs have been built with 7.4.6: https://docs.python.org/3.12/ A search for me (on mobile): Seems improved! (Closing the issue for now -- please report other search ranking issues to Sphinx, as we can't do much in here CPython.) A |
By the way, remember to clear your browser cache (CTRL+SHIFT+R on FF) (I needed to do that otherwise I had the old results somewhat?) |
(I initially posted this in the pythondotorg repo - where I was directed here. Copying the description from there verbatim)
Describe the bug
Searching for library modules on 3.12 returns first a list of "What's new in <version>" pages instead of the searched for module.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the asyncio module page to be the first result, or at the very least to appear very close to the top. This has been the case in previous versions of the website search.
Screenshots
![image](https://private-user-images.githubusercontent.com/20134422/332903603-43c44cd9-39f1-49ac-9800-ec59fe182245.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM0MDk3MDAsIm5iZiI6MTcyMzQwOTQwMCwicGF0aCI6Ii8yMDEzNDQyMi8zMzI5MDM2MDMtNDNjNDRjZDktMzlmMS00OWFjLTk4MDAtZWM1OWZlMTgyMjQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODExVDIwNTAwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwOTZjNDdhNDViYmVhYWQwNjUyMWNkOTNiNTczNjRhNGVhODExNDZhNDZlZDA5MjU2NzBiYWE5NGU3N2RhMDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.f3VUf-KqHlqjC4DxlfM75ggR_W1fJ9WPlEg63UXWRuk)
(the list goes on a few more entries below the screenshot)
Compare with search from 3.11:
![image](https://private-user-images.githubusercontent.com/20134422/332904975-8e07f1c8-151d-4ea3-86c6-bc5454194399.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM0MDk3MDAsIm5iZiI6MTcyMzQwOTQwMCwicGF0aCI6Ii8yMDEzNDQyMi8zMzI5MDQ5NzUtOGUwN2YxYzgtMTUxZC00ZWEzLTg2YzYtYmM1NDU0MTk0Mzk5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODExVDIwNTAwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE5NGQ2NTFkZDQ3MmI3OTlkOGRiZDI3ODZkNmRmZDYwZWMwODcyZDI0OTE0NWZjZWQ1MGYwMjFlZmE0NDJjOGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.CqcJ7tkgCTWQAnJR-6cqRbxkj34ITdjWtQdwHPR2fTk)
Desktop (please complete the following information):
Additional context
This happens for other topics too, not only modules.
The text was updated successfully, but these errors were encountered: