lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r882406 - in /incubator/lucene.net/trunk/C#/src: Lucene.Net/Search/Function/CustomScoreQuery.cs Test/Search/CheckHits.cs
Date Fri, 20 Nov 2009 04:02:14 GMT
Author: aroush
Date: Fri Nov 20 04:02:14 2009
New Revision: 882406

URL: http://svn.apache.org/viewvc?rev=882406&view=rev
Log:
Fixed NUnit test-cases for: Function.TestCustomScoreQuery

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/CustomScoreQuery.cs
    incubator/lucene.net/trunk/C#/src/Test/Search/CheckHits.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/CustomScoreQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Function/CustomScoreQuery.cs?rev=882406&r1=882405&r2=882406&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/CustomScoreQuery.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Function/CustomScoreQuery.cs Fri Nov
20 04:02:14 2009
@@ -415,7 +415,7 @@
 			public override Explanation Explain(IndexReader reader, int doc)
 			{
 				Explanation explain = DoExplain(reader, doc);
-				return explain == null?new Explanation(0.0f, "no matching docs"):DoExplain(reader, doc);
+				return explain == null?new Explanation(0.0f, "no matching docs"):explain;
 			}
 			
 			private Explanation DoExplain(IndexReader reader, int doc)

Modified: incubator/lucene.net/trunk/C#/src/Test/Search/CheckHits.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Search/CheckHits.cs?rev=882406&r1=882405&r2=882406&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Search/CheckHits.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Search/CheckHits.cs Fri Nov 20 04:02:14 2009
@@ -31,8 +31,13 @@
 		/// <summary> Some explains methods calculate their values though a slightly
 		/// different  order of operations from the actual scoring method ...
 		/// this allows for a small amount of variation
+        /// 
+        /// mgarski - Java uses a value of 0.00005f, which causes tests in TestCustomScoreQuery
+        /// to fail when comparing the scorer and explanation scores with the wrapped
+        /// indexes and query boosts of greater than 2.0.  A comparison of the Java and .Net

+        /// explanations reveal a floating point precision issue, not a hidden defect.
 		/// </summary>
-		public static float EXPLAIN_SCORE_TOLERANCE_DELTA = 0.00005f;
+		public static float EXPLAIN_SCORE_TOLERANCE_DELTA = 0.00025f;   // {{See: LUCENENET-288}}
Intentional diversion from Java Lucene per above comment
 		
 		/// <summary> Tests that all documents up to maxDoc which are *not* in the
 		/// expected result set, have an explanation which indicates no match



Mime
View raw message