Closed imaimai86 closed 8 years ago
Thanks for creating this issue @imaimai86 . I will be looking it over and try to determine a resolution as soon as possible.
Hi @imaimai86, sorry for the delay. I dug into it and I think I found your problem. When you are using the WithSortField() method, you are passing in the sort=
as a prefix, which is handled for you automatically by the PHP client. If you simply pass in your field name and direction, it should work, e.g. profile_name_s_register asc
.
To provide an example and ensure this works properly, I added a test to the test suite which you can see here: https://github.com/basho/riak-php-client/blob/develop/tests/functional/SearchOperationsTest.php#L181
Hi,
I removed the "sort =" from the query, Now I am getting results but not sorted.
->withSortField( 'profile_name_s_register asc' );
Is there any additional configuration so that the sort will work in riak. I am getting sorted results using http client.
When i query my index using http client with following parameters, it returns me proper results, but php client is not giving me results. Removing the sort option in php client returns results
Host::8098/search/query/indx_profile?wt=json&q=profile_name_s_register:*&sort=profile_name_s_register%20asc&start=0&rows=500
But when i add sort option in php client using "withSortField", it is not returning any results.
I dumped the command variable and got the following response