lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r630698 - /lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java
Date Sun, 24 Feb 2008 22:43:25 GMT
Author: yonik
Date: Sun Feb 24 14:43:24 2008
New Revision: 630698

URL: http://svn.apache.org/viewvc?rev=630698&view=rev
Log:
fix for reordering scorers from highest to lowest original skip (possible slight performance
gain only... no correctness implications)

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java?rev=630698&r1=630697&r2=630698&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java Sun Feb 24
14:43:24 2008
@@ -101,11 +101,11 @@
     // Keep last scorer in it's last place (it will be the first
     // to be skipped on), but reverse all of the others so that
     // they will be skipped on in order of original high skip.
-    int end=(scorers.length-1)-1;
+    int end=(scorers.length-1);
     for (int i=0; i<(end>>1); i++) {
       Scorer tmp = scorers[i];
-      scorers[i] = scorers[end-i];
-      scorers[end-i] = tmp;
+      scorers[i] = scorers[end-i-1];
+      scorers[end-i-1] = tmp;
     }
 
     return more;



Mime
View raw message