lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lai...@apache.org
Subject lucenenet git commit: add additional test
Date Sun, 24 May 2015 19:08:37 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/failingtests d0f8b59f2 -> d331774ce


add additional test


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/d331774c
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/d331774c
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/d331774c

Branch: refs/heads/failingtests
Commit: d331774ce2b51d55d8c7c78592af619a8b24596b
Parents: d0f8b59
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Sun May 24 15:08:28 2015 -0400
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Sun May 24 15:08:28 2015 -0400

----------------------------------------------------------------------
 .../core/Search/TestFuzzyQuery.cs                 | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d331774c/src/Lucene.Net.Tests/core/Search/TestFuzzyQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestFuzzyQuery.cs b/src/Lucene.Net.Tests/core/Search/TestFuzzyQuery.cs
index f61cedd..62ff6d7 100644
--- a/src/Lucene.Net.Tests/core/Search/TestFuzzyQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestFuzzyQuery.cs
@@ -235,6 +235,24 @@ namespace Lucene.Net.Search
         }
 
         /// <summary>
+        /// This test is to help experiment with float calculations and results
+        /// </summary>
+        [Test]
+        [Category("Focus")]
+        public virtual void FloatOutputs()
+        {
+            var minSimilarity = 0.0;
+
+            var scaleFactor = 1.0f / (1.0f - minSimilarity);
+
+            float similarity = 1.0f - (float)1/(float)7;
+            var max = (similarity - minSimilarity)*scaleFactor;
+
+            Console.WriteLine(max.ToString("f20"));
+
+        }
+
+        /// <summary>
         /// MultiTermQuery provides (via attribute) information about which values
         /// must be competitive to enter the priority queue.
         ///


Mime
View raw message