You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2011/10/03 16:34:50 UTC

svn commit: r1178417 - /lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/CheckHits.java

Author: rmuir
Date: Mon Oct  3 14:34:50 2011
New Revision: 1178417

URL: http://svn.apache.org/viewvc?rev=1178417&view=rev
Log:
LUCENE-3478: committed wrong patch: need to abs for relative delta as TestComplexExplanations creates negative scores

Modified:
    lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/CheckHits.java

Modified: lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/CheckHits.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/CheckHits.java?rev=1178417&r1=1178416&r2=1178417&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/CheckHits.java (original)
+++ lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/CheckHits.java Mon Oct  3 14:34:50 2011
@@ -306,7 +306,7 @@ public class CheckHits {
   }
 
   private static float explainToleranceDelta(float f1, float f2) {
-    return Math.max(f1, f2) * EXPLAIN_SCORE_TOLERANCE_DELTA;
+    return Math.max(Math.abs(f1), Math.abs(f2)) * EXPLAIN_SCORE_TOLERANCE_DELTA;
   }
 
   /**