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

Utf-8 search fails #22

Open
nagabhushan opened this issue Oct 5, 2015 · 0 comments
Open

Utf-8 search fails #22

nagabhushan opened this issue Oct 5, 2015 · 0 comments

Comments

@nagabhushan
Copy link

Hi ,

Tried utf-8 search on text field...got following error.
Please let me know the fix.

import scorched

si = scorched.SolrInterface("http://192.168.0.115:8983/solr/unicodecore/")

for result in si.query(name="आदित्य"):
print result

Traceback (most recent call last):
File "test_sss.py", line 9, in
for result in si.query(name="आदित्य"):
File "/home/nagabhushan/nagav/lib/python2.7/site-packages/scorched-0.6-py2.7.egg/scorched/connection.py", line 389, in query
return q.query(_args, *_kwargs)
File "/home/nagabhushan/nagav/lib/python2.7/site-packages/scorched-0.6-py2.7.egg/scorched/search.py", line 411, in query
newself.query_obj.add(args, kwargs)
File "/home/nagabhushan/nagav/lib/python2.7/site-packages/scorched-0.6-py2.7.egg/scorched/search.py", line 329, in add
self.add_exact(field_name, v, terms_or_phrases)
File "/home/nagabhushan/nagav/lib/python2.7/site-packages/scorched-0.6-py2.7.egg/scorched/search.py", line 346, in add_exact
this_term_or_phrase = term_or_phrase or self.term_or_phrase(inst)
File "/home/nagabhushan/nagav/lib/python2.7/site-packages/scorched-0.6-py2.7.egg/scorched/search.py", line 369, in term_or_phrase
return 'terms' if self.default_term_re.match(str(arg)) else 'phrases'
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant