So they are sorted by reverse document number. Is this the 'external'
document number (the one that is adjusted for the segment's base)? If so,
then this means that documents with equal score are returned in the order in
which they were added to the index.  Is this correct?

Thanks,
Peter

----- Original Message ----- 
From: "Morus Walter" <[EMAIL PROTECTED]>
To: "Lucene Users List" <[EMAIL PROTECTED]>
Sent: Saturday, January 17, 2004 4:57 PM
Subject: Re: Ordening documents


> Peter Keegan writes:
> > What is the returned order for documents with identical scores?
> have a look at the source of the lessThan method in
> org.java.lucene.search.HitQueue:
>
> protected final boolean lessThan(Object a, Object b) {
>     ScoreDoc hitA = (ScoreDoc)a;
>     ScoreDoc hitB = (ScoreDoc)b;
>     if (hitA.score == hitB.score)
>       return hitA.doc > hitB.doc;
>     else
>       return hitA.score < hitB.score;
> }
>
> sorting is done by this method.
>
> HTH
> Morus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to