lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Bernstein <joels...@gmail.com>
Subject Re: multiple order by clauses with the sql handler
Date Thu, 29 Dec 2016 20:33:44 GMT
This would be a bug. I'll take a look at the test cases and see if there is
a test case for this.

Joel Bernstein
http://joelsolr.blogspot.com/

On Thu, Dec 29, 2016 at 3:17 PM, radha krishnan <dradhakrishnan24@gmail.com>
wrote:

> Hi,
>
> when i was trying out the SQL functionality, i realized that
>
> multiple order by clauses work only when " select distinct " command is
> used where as it does not work with a " select "command
>
> Eg:
>
> SELECT distinct name, salary, distance_from_office FROM "employees_core"
> ORDER BY salary desc , name desc -- this one works
>
> SELECT name, salary, distance_from_office FROM "employees_core" ORDER BY
> salary desc , name desc -- this does not work and fails with the response,
>
>
> {
>
>   "result-set":{"docs":[
>
> {
>
>     "EXCEPTION":"java.util.concurrent.ExecutionException:
> java.io.IOException: --> http://localhost:8983/solr/employees_core/:Can't
> determine a Sort Order (asc or desc) in sort spec 'salary descname desc',
> pos=6",
>
>     "EOF":true,
>
>     "RESPONSE_TIME":152}]}}
>
>
>
> is it by design that multiple order by will work only with select distinct
> ?
>
>
>
>
> Thanks,
>
> Radhakrishnan D
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message