Because "score desc" is the default Lucene & Solr behavior when no explicit sort is specified, QueryParsing.parseSort() returns a null sort so that the non-sort versions of the query execution routines get called. However the caller SolrPluginUtils.parseSort issues that warning whenever it gets a null sort. Perhaps that interaction should be altered, or perhaps it should be left in as a sort of "are you sure you want to tell me what I already know?", er, warning. But as it stands you can simply ignore it, or else leave the sort off entirely when it is "score desc"; if the behavior were different in those two cases it would certainly be a bug, but as you noted that's not the case.
- J.J. At 10:50 AM -0400 6/21/07, gerard sychay wrote: >Hello all, > >This is a minor issue and does not affect Solr operation, but I could not find >it in the issue tracking. > >To reproduce: > >- I set up a Solr server with the example docs indexed by following the Solr >tutorial. > >- I clicked on the following example search under the "Sorting" section: > >http://localhost:8983/solr/select/?indent=on&q=video&sort=score+desc > >- I added a "qt" parameter to try out the DisMax Request Handler: > >http://localhost:8983/solr/select/?indent=on&q=video&sort=score+desc&qt=dismax > >- In the Solr output, I get: > >WARNING: Invalid sort "score desc" was specified, ignoring Jun 21, 2007 >10:33:37 AM org.apache.solr.core.SolrCore execute >INFO: /select/ sort=score+desc&indent=on&qt=dismax&q=video 0 131 > >The WARNING line is the issue. It does not seem that it should be there. But >as I said, it does not appear to affect operation as the results are sorted by >score descending anyway (because that is the default?).