lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <yo...@lucidimagination.com>
Subject Re: SOLR Sorting algorithm
Date Tue, 06 Sep 2011 18:11:27 GMT
When sorting, ties are broken by the internal document id.  This gives
us a stable (if somewhat arbitrary) sort ordering.
If you want score to be the tiebreaker, you can specify it as the
secondary sort.

-Yonik
http://www.lucene-eurocon.com - The Lucene/Solr User Conference


On Tue, Sep 6, 2011 at 1:49 PM, BrianK <brian.krueger@bonton.com> wrote:
> We are running a SOLR query and are specifying a custom sort field to sort
> our results based on our sort field rather than the default score.  For the
> most part, the results are sorting by our field, but SOLR appears to be
> sorting the results by some other field or alogorithm and it's not the score
> field.  Our documents are populated from a database table and when running a
> similar query/sort against the database we don't get the same sort sequence
> as SOLR even though the sort is on the same field in both systems.
> IMPORTANT NOTE: the sort field/results field is not unique, the search
> results in question have the same value (1 in this case), but the results
> always come out in the same order.
>
> Can someone explain or point me in the right direction to determine how SOLR
> sorts results beyond the field specified in our query string.
>
> Example Query: q=Kitchen Products&sort=sortSequence asc
>
> Example Results:
> name: Product 1
> sortSequence: 1
> score: 1.52221
>
> name: Product 5
> sortSequence: 1
> score: 1.52221
>
> name: Product 3
> sortSequence: 1
> score: 1.53112
>
> name: Product 2
> sortSequence: 2
> score: 1.51112
>
> etc.
>
> Are there hidden fields like document date, creation date, or other field
> that is not visible that might be factored into a sort?
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SOLR-Sorting-algorithm-tp3314295p3314295.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
>

Mime
View raw message