Return-Path: X-Original-To: apmail-lucenenet-commits-archive@www.apache.org Delivered-To: apmail-lucenenet-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD45E18D3E for ; Sun, 24 May 2015 01:10:18 +0000 (UTC) Received: (qmail 61176 invoked by uid 500); 24 May 2015 01:10:18 -0000 Delivered-To: apmail-lucenenet-commits-archive@lucenenet.apache.org Received: (qmail 61153 invoked by uid 500); 24 May 2015 01:10:18 -0000 Mailing-List: contact commits-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucenenet.apache.org Delivered-To: mailing list commits@lucenenet.apache.org Received: (qmail 61144 invoked by uid 99); 24 May 2015 01:10:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 May 2015 01:10:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9FB65E065F; Sun, 24 May 2015 01:10:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: laimis@apache.org To: commits@lucenenet.apache.org Message-Id: <6854c32ba0fe4e07a0d985c7cff13a51@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: lucenenet git commit: more logging Date: Sun, 24 May 2015 01:10:18 +0000 (UTC) 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 Authored: Sat May 23 21:10:07 2015 -0400 Committer: Laimonas Simutis 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); } }