lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Possible Solr optimization - not calculating score when sorting
Date Wed, 13 Feb 2013 15:38:42 GMT
Putting my last email together about new Lucene features in Solr has led 
to an unrelated question:

If you have a sort parameter that does not include score, and you don't 
request score on the fl parameter, is Solr smart enough to not bother 
calculating it or applying boosts, especially with distributed search? 
I have a boost parameter using a few mathematical functions in my 
edismax handler definition.  I'd rather not have that calculation 
performed if it will never be used.

A quick test with with and debugQuery=true suggests that 
this is NOT the case.  The maxScore field in is blank 
whether debugQuery is there or not, but with debugQuery, the full score 
calculation is present under explain.  I can't tell if the calculation 
is made just because I requested the debug.  It would be good (IMHO) if 
the calculation were skipped entirely when sorting on fields other than 
score, even when debugQuery=true.

Are such optimizations already in place when debugQuery=false?  If not, 
I can open an issue.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message