Navigation Menu

Skip to content
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 Inside (i.e. full-text search of Archive books) fails with Unicode #361

Closed
bfalling opened this issue Oct 26, 2016 · 5 comments · Fixed by #491
Closed

Search Inside (i.e. full-text search of Archive books) fails with Unicode #361

bfalling opened this issue Oct 26, 2016 · 5 comments · Fixed by #491
Labels
Module: Solr Issues related to the configuration or use of the Solr subsystem. [managed] Theme: Search Issues related to search UI and backend. [managed]

Comments

@bfalling
Copy link
Collaborator

https://openlibrary.org/search/inside?q=Антон+Чехов

generates the following error:

/opt/openlibrary/deploys/openlibrary/93ddc9e/openlibrary/templates/search/inside.html: error in processing template: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128) (falling back to default template)
@mekarpeles mekarpeles added the Theme: Search Issues related to search UI and backend. [managed] label Mar 23, 2017
@mekarpeles
Copy link
Member

I can look into this eventually, cc'ing @gdamdam only because it's relevant to his full text search work (no action required from him)

@hornc
Copy link
Collaborator

hornc commented May 13, 2017

unfortunately I merely stopped the error, not made the search work :(
https://dev.openlibrary.org/search/inside?q=%D0%90%D0%BD%D1%82%D0%BE%D0%BD+%D0%A7%D0%B5%D1%85%D0%BE%D0%B2

returns a ridiculous number of results. I think the unicode characters are being dropped now. Needs further investigation.

@hornc hornc reopened this May 13, 2017
@hornc
Copy link
Collaborator

hornc commented May 13, 2017

I think a bug-fixed urlencode is needed like is implemented here: https://github.com/internetarchive/openlibrary/blob/master/openlibrary/utils/solr.py#L12

@hornc hornc added the Module: Solr Issues related to the configuration or use of the Solr subsystem. [managed] label Nov 1, 2017
@tfmorris
Copy link
Contributor

This works for me.

@bfalling are you happy to close it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Solr Issues related to the configuration or use of the Solr subsystem. [managed] Theme: Search Issues related to search UI and backend. [managed]
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants