Re: DismaxRequestHandler reports sort by score as invalid

2007-06-21 Thread J.J. Larrea
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=onq=videosort=score+desc

- I added a qt parameter to try out the DisMax Request Handler:

http://localhost:8983/solr/select/?indent=onq=videosort=score+descqt=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+descindent=onqt=dismaxq=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?).



Re: DismaxRequestHandler reports sort by score as invalid

2007-06-21 Thread Yonik Seeley

A little background:
I originally conceived of query operation chains (based on some of my
previous hacking in mechanical investing stock screens: select all
stocks; take top 10% lowest PE; then take the top 20 highest growth
rate; then sort descending by 13 week relative strength).

So, I thought that the next thing after a query *might* be a sort, so
getSort() shouldn't throw an exception if it wasn't.  I think this
idea is now outdated (we know when we have a sort spec) and an
exception should just be thrown on a syntax error.

-Yonik

On 6/21/07, J.J. Larrea [EMAIL PROTECTED] wrote:

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=onq=videosort=score+desc

- I added a qt parameter to try out the DisMax Request Handler:

http://localhost:8983/solr/select/?indent=onq=videosort=score+descqt=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+descindent=onqt=dismaxq=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?).