lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1178417 - /lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/CheckHits.java
Date Mon, 03 Oct 2011 14:34:50 GMT
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;
   }
 
   /** 



Mime
View raw message