lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lai...@apache.org
Subject lucenenet git commit: more logging
Date Sun, 24 May 2015 01:10:18 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/failingtests 9a63c23bb -> ef33466ae


more logging


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

Branch: refs/heads/failingtests
Commit: ef33466ae6e0b01bbb0d58a4e3a9cd51edb23473
Parents: 9a63c23
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Sat May 23 21:10:07 2015 -0400
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Sat May 23 21:10:07 2015 -0400

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


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ef33466a/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 7d47534..2264307 100644
--- a/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs
+++ b/src/Lucene.Net.Core/Search/FuzzyTermsEnum.cs
@@ -242,16 +242,22 @@ namespace Lucene.Net.Search
             // true if the last term encountered is lexicographically equal or after the
bottom term in the PQ
             bool termAfter = BottomTerm == null || (lastTerm != null && TermComparator.Compare(lastTerm,
BottomTerm) >= 0);
 
+            var maxBoost = CalculateMaxBoost(MaxEdits);
+
+            OutputCollector.AppendLine("    termAfter=" + termAfter + ", Bottom=" + Bottom
+ ", maxBoost=" + maxBoost);
+            OutputCollector.AppendLine("    bottom >= maxBoost=" + (Bottom >= maxBoost)
+ ", bottom > maxBoost=" + (Bottom > maxBoost));
+
             // 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))
             {
                 MaxEdits--;
             }
 
-            OutputCollector.AppendLine("FuzzyTermsEnum bottom changed, oldMaxIedits=" + oldMaxEdits
+ ", maxEdits=" + MaxEdits);
+            OutputCollector.AppendLine("    oldMaxEdits=" + oldMaxEdits + ", maxEdits=" +
MaxEdits);
             if (oldMaxEdits != MaxEdits || init) // the maximum n has changed
             {
+                OutputCollector.AppendLine("    Max distance changed");
                 MaxEditDistanceChanged(lastTerm, MaxEdits, init);
             }
         }


Mime
View raw message