-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Search results are different when logged in #4452
Comments
This definitely looks like an API bug. It seems like there is a search API that 404s when a user is logged out. |
This API 404s when the version is not public. I'm still investigating this to see exactly what the benefits and tradeoffs are. |
I do not think its a bug. If the project is not public, we do not show to them to public user. |
Not sure what you mean. I accessed the docs when logged out, so they must have been accessible to the public user. And I got different, correct results doing that than what was served when I was logged in. |
@davidism So the logic is according to permission. In the readthedocs.org site, all the docs are accessed publically, but that does not mean the project information is disclosed publically. So user can see the doc, but they can not search inside the doc. I think @ericholscher can explain more about the feature. While I was working on search rewrite, I was also confused by this issue! |
How is getting different, incorrect results when logged in not a bug? Why is the Sphinx-generated search calling out to the RTD API and changing the results when logged in? RTD should only be serving the built docs at that point, there should be no authentication or API involved. |
With sphinix, its not possible to have many search features. That can be a different design issue. |
I strongly hope our ongoing search upgrade will have more accurate result than current one. |
I think a combination of proceeding on the search upgrade and an opt-out flag for custom search seems like a good path forward. |
Showing different results is a bug with privacy levels, which shouldn't effect projects once they are live and public. The poor search results are another issue. The goal here is to provide better search than Sphinx can with it's basic JS backed search indexes. Sphinx search isn't full-text, and doesn't provide results for a large number of words in the normal documentation text. Our goal is to build something better built on top of elastic search. The specific issue that would address this is #4289 -- currently we are just doing full-text indexing, without taking into account the code-level objects. Indexing the code objects will make this work much better, and the goal is to have it done in the next couple weeks as part of our Search Improvement GSOC, which will also offer many other search improvements. Interestingly, the results should be in the pages that we are indexing, so I'm not 100% sure why they aren't showing up. |
I tried to test flask against our revamped search, but ended up with an issue building the docs with the theme:
Seems related to the removal of Edit: Got it working -- looks like it depended on a tagged version being active |
I've got results for this in the new branch, and we're working to make sure the proper API reference gets weighted properly. |
When I said "API result", I meant the link to specific API methods, not the literal "API" link, although that does appear to be weighted differently too. The header and api links have a |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Seems to still be an issue. |
Looks like the flag added by #4570 can't be overridden in {%- if READTHEDOCS and not readthedocs_docsearch %}
<script>
if (typeof READTHEDOCS_DATA !== 'undefined') {
if (!READTHEDOCS_DATA.features) {
READTHEDOCS_DATA.features = {};
}
READTHEDOCS_DATA.features.docsearch_disabled = true;
}
</script>
{%- endif %} However, RTD's JS, which is injected after the code above, doesn't check if I can put my override script in the |
Fix for search disable flag in Pallets-Sphinx-Themes: pallets/pallets-sphinx-themes#20 |
Ya, this isn't ideal. We try to inject late for performance reasons but that isn't ideal. I think the longer term solution here is to have a better way to turn off docsearch, the flyout menu and other features (probably in the YAML file). |
@davidism |
I'm referring to the ones within Sphinx, not from the readthedocs project page. |
@davidism |
We dropped the privacy levels from .org, and we don't use that to filter results anymore. We are also indexing more content for search now (#7063). The last PR should be deployed next week. |
Details
Expected Result
Searching using the Sphinx-generated search page should return the same results whether I am logged in to RTD or not.
Actual Result
When I am logged in to RTD, search returns different results that are missing API links, context, and highlighting. If I do the same search in a private windows, I get the expected results that match our current hosted docs. @davidfischer got the correct results even though he was logged in, the difference is that I'm an owner of the project.
The text was updated successfully, but these errors were encountered: