sort order errors

64 views
Skip to first unread message

Greg

unread,
Nov 7, 2011, 10:09:18 PM11/7/11
to PHP Solr Client
Hi,

If I send through a sort parameter of 'name' I get an error on tomcat
saying it "Can't determine the sort order", also if I put 'name+desc'
I get the same error, though note that the plus sign is changed to
%2B.

If I put the same query 'name+desc' into a direct call to solr from
the browser I don't get the error and the results are sorted.

Cheers

Greg

unread,
Nov 7, 2011, 11:28:18 PM11/7/11
to PHP Solr Client
It works by just excluding the plus sign, so using a space instead.

Donovan Jimenez

unread,
Nov 8, 2011, 10:46:23 AM11/8/11
to php-sol...@googlegroups.com
did you try a sort parameter of "name desc", this is what Solr is expecting after decoding the query paramaters. The client will automaticly encode the space as a + according to query string encoding rules (so don't do it yourself).  

See: http://wiki.apache.org/solr/CommonQueryParameters#sort

Good luck,
Donovan
> --
> You received this message because you are subscribed to the Google Groups "PHP Solr Client" group.
> To post to this group, send email to php-sol...@googlegroups.com.
> To unsubscribe from this group, send email to php-solr-clie...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/php-solr-client?hl=en.
>
>
Reply all
Reply to author
Forward
0 new messages