lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lai...@apache.org
Subject lucenenet git commit: change calculation
Date Sun, 24 May 2015 02:17:11 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/failingtests 61c2d0681 -> cd4188d1a


change calculation


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

Branch: refs/heads/failingtests
Commit: cd4188d1abafc3a1c989b48e14fa4513e7eaefc7
Parents: 61c2d06
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Sat May 23 22:16:45 2015 -0400
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Sat May 23 22:16:45 2015 -0400

----------------------------------------------------------------------
 src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd4188d1/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs b/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs
index 1dab0e0..546cdab 100644
--- a/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs
+++ b/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs
@@ -243,10 +243,12 @@ namespace Lucene.Net.Search
             bool termAfter = BottomTerm == null || (lastTerm != null && TermComparator.Compare(lastTerm,
BottomTerm) >= 0);
 
             OutputCollector.AppendLine("    termAfter=" + termAfter + ", Bottom=" + Bottom.ToString("R"));
-            
+
+            var maxBoost = CalculateMaxBoost(MaxEdits);
+
             // as long as the max non-competitive boost is >= the max boost
             // for some edit distance, keep dropping the max edit distance.
-            while (MaxEdits > 0 && (termAfter ? Bottom >= CalculateMaxBoost(MaxEdits)
: Bottom > CalculateMaxBoost(MaxEdits)))
+            while (MaxEdits > 0 && (termAfter ? Bottom >= maxBoost : Bottom
> maxBoost))
             {
                 OutputCollector.AppendLine("    subtract.");
                 MaxEdits--;


Mime
View raw message