You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by la...@apache.org on 2015/05/24 04:17:11 UTC

lucenenet git commit: change calculation

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 <la...@gmail.com>
Authored: Sat May 23 22:16:45 2015 -0400
Committer: Laimonas Simutis <la...@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--;