-
Notifications
You must be signed in to change notification settings - Fork 12
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: default Sphinx's search doesn't work when I search Chinese or Janpanese #397
Comments
When performing a search on your project using default Sphinx's search, I see a Javascript error in the console saying that jQuery is not present. The call is done in a Have you updated your Sphinx version recently? Note that newer versions don't install Sphinx by default, so you should install https://pypi.org/project/sphinxcontrib-jquery/ -- could you try installing that extension? Read the Docs doesn't have control over the default Sphinx's search anymore. We stopped manipulating that code starting on October 7th, 2024. The error you are seeing should be related to Sphinx only.
Great! This is what we 100% control 💯
Nope, we don't provide a link to a direct search using our addons yet as you figured it out 😄 |
Thanks, so it's because Sphinx search doesn't support Chinese search itself, and readthedocs search covered this result before. Now I added html_search_language and html_search_options to conf.py:
But it still don't work. I'll look it up myself again. Anyway, now I know the reason why I can't get result in the search. Thank you! |
Not quite right... It can actually work now, but it's difficult to use... search: "技能抽取", it don't work... May I ask how to make the search box of the theme directly use the addon search API? |
Yes, if you re-build your documentation with the latest 3.0.1 Read the Docs Sphinx theme, you will get this behavior by default. |
After addons is enabled, default Sphinx's search doesn't work when I search Chinese:
https://ocg-rule.readthedocs.io/zh-cn/latest/search.html?q=%22%E6%8A%80%E8%83%BD%E6%8A%BD%E5%8F%96%22
or Japanese: https://ocg-rule.readthedocs.io/zh-cn/latest/search.html?q=%22%E3%82%AF%E3%82%A4%E3%83%83%E3%82%AF%E3%82%A8%E3%83%95%E3%82%A7%E3%82%AF%E3%83%88%22
but works normally when I search English:
https://ocg-rule.readthedocs.io/zh-cn/latest/search.html?q=%22quick%22
I can confirm default Sphinx's search can search Chinese or Japanese normally before.
And, addon search api can search Chinese or Japanese:
![image](https://private-user-images.githubusercontent.com/29814851/374586965-5518202e-9c58-4f82-9204-7c07afc9ad97.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTkzMTUsIm5iZiI6MTczOTI1OTAxNSwicGF0aCI6Ii8yOTgxNDg1MS8zNzQ1ODY5NjUtNTUxODIwMmUtOWM1OC00ZjgyLTkyMDQtN2MwN2FmYzlhZDk3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MzAxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVmM2U0Yjg4MTQ5NWU2NjNkMzE4MTA1YjhjNjQxMjcwYjQ3NTVmNDMwZjA3NDU1ZDA4NzliMWFlOTI0MmM1MzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-YgMJo4yECHxZj7U9OHsTdmd1Q2SUKH3PCLNjwdD6FM)
![image](https://private-user-images.githubusercontent.com/29814851/374587829-8af832b0-3117-4018-98d6-48f87b78a311.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTkzMTUsIm5iZiI6MTczOTI1OTAxNSwicGF0aCI6Ii8yOTgxNDg1MS8zNzQ1ODc4MjktOGFmODMyYjAtMzExNy00MDE4LTk4ZDYtNDhmODdiNzhhMzExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MzAxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU5ZTJiZGEzOGViYTQ1ZTc3ZDgzZThiMjUyZWFhMWExZmVlYjBhN2E5ZjU5ZDlkMTk2MjE5NDYzMDUwOWQ4Y2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1HI7-RBKOHWRPIc97QmXLUH9k2Js1xk3u0riQyvFu1w)
https://ocg-rule.readthedocs.io/_/api/v3/search/?q=project%3Aocg-rule%2Flatest+%E6%8A%80%E8%83%BD%E6%8A%BD%E5%8F%96
https://ocg-rule.readthedocs.io/_/api/v3/search/?q=project%3Aocg-rule%2Flatest+%E3%82%AF%E3%82%A4%E3%83%83%E3%82%AF%E3%82%A8%E3%83%95%E3%82%A7%E3%82%AF%E3%83%88
just default Sphinx's search doesn't work.
I have reviewed the changelog and issues, but still don't know how to fix it.
Or, does the addon search provide a URL somewhere? like this: #21 (comment)
Thanks!
The text was updated successfully, but these errors were encountered: