lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Documents with SOLR function "sort" are NOT sorted by score
Date Fri, 12 Dec 2014 14:22:24 GMT
On 12/11/2014 9:51 PM, eakarsu wrote:
> I am having difficulty with my sort function. With the following sort,
> documents are not sorted by score if you can see. Why sort function is not
> able to sort it properly?

I don't know why this is surprising.  If you don't use the sort
parameter at all, the default is "score desc" ... if you DO use the sort
parameter, that is ignored, and the sort *only* uses the parameter(s)
you supplied.

The score for each document is not affected by the sort parameter at all
... the only way to affect the score is to use boosting, and if you're
doing boosting, chances are good that you're not going to use a sort
parameter, because you'll want it sorted by score.

It's my understanding that when a sort parameter is used, the score is
ONLY calculated when you explicitly ask for it, or you turn debug on.
If that understanding is correct, then normally there is no performance
penalty involved for a score calculation that won't get used.


View raw message