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

Crash message when searching with sort and reduced field list. [JIRA: CLIENTS-393] #362

Open
stevegaron opened this issue Aug 22, 2014 · 2 comments

Comments

@stevegaron
Copy link

I'm getting a crash message when I do a search that include both field list limitation and sort. It seems to be crashing in erlang on the server side with an Error processing incoming message: error:badarg in riak_api_pb_server.erl. I'm only getting this crash through the python client it actually works from the web interface.

So the following code will crash:

bucket.search("*:*", start=0, rows=1, fl="_yz_rk", sort="_yz_rk desc")

But on the web server side the following works:

http://server.com:8098/search/query/bucket?q="*:*"&start=0&rows=1&fl=_yz_rk&sort=_yz_rk%20desc

I'm running Riak 2.0 RC1 with python client 2.1 RC.

More info. I tried switching the protocol to HTTP inside the python client and it is still crashing. But now the error is more descriptive. I'm getting a KeyError for the field maxScore at the following:

codec.py:229                   result['max_score'] = float(json[u'response'][u'maxScore'])
@stevegaron stevegaron changed the title Crash message when searching with sort and reduce field list. Crash message when searching with sort and reduced field list. Aug 22, 2014
@seancribbs seancribbs added this to the 2.0.1 milestone Aug 29, 2014
@seancribbs seancribbs added the Bug label Aug 29, 2014
@DSomogyi
Copy link

DSomogyi commented May 6, 2015

.

@Basho-JIRA Basho-JIRA changed the title Crash message when searching with sort and reduced field list. Crash message when searching with sort and reduced field list. [JIRA: CLIENTS-393] May 6, 2015
@alirizakeles
Copy link
Contributor

A workaround is to add score field:

bucket.search("*:*", start=0, rows=1, fl="_yz_rk, score", sort="_yz_rk desc")

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

No branches or pull requests

5 participants