lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/search FieldSortedHitQueue.java
Date Thu, 30 Sep 2004 18:46:27 GMT
dnaber      2004/09/30 11:46:27

  Modified:    src/java/org/apache/lucene/search Tag: lucene_1_4_2_dev
                        FieldSortedHitQueue.java
  Log:
  backport fix for bug #31241 (duplicates with sorting)
  PR:31241
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.11.2.2  +4 -1      jakarta-lucene/src/java/org/apache/lucene/search/FieldSortedHitQueue.java
  
  Index: FieldSortedHitQueue.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/FieldSortedHitQueue.java,v
  retrieving revision 1.11.2.1
  retrieving revision 1.11.2.2
  diff -u -r1.11.2.1 -r1.11.2.2
  --- FieldSortedHitQueue.java	29 Sep 2004 21:17:00 -0000	1.11.2.1
  +++ FieldSortedHitQueue.java	30 Sep 2004 18:46:27 -0000	1.11.2.2
  @@ -95,6 +95,9 @@
         c = (fields[i].reverse) ? comparators[i].compare (docB, docA)
                                 : comparators[i].compare (docA, docB);
       }
  +    // avoid random sort order that could lead to duplicates (bug #31241):
  +    if (c == 0)
  +      return docA.doc > docB.doc;
       return c > 0;
     }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message