Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 81D74200C0B for ; Sun, 29 Jan 2017 14:27:25 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8085D160B71; Sun, 29 Jan 2017 13:27:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BB62B160B64 for ; Sun, 29 Jan 2017 14:27:24 +0100 (CET) Received: (qmail 1699 invoked by uid 500); 29 Jan 2017 13:27:23 -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 1343 invoked by uid 99); 29 Jan 2017 13:27:23 -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, 29 Jan 2017 13:27:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 63517DFF26; Sun, 29 Jan 2017 13:27:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: nightowl888@apache.org To: commits@lucenenet.apache.org Date: Sun, 29 Jan 2017 13:27:31 -0000 Message-Id: <385fc1f8176a43d5ba191e73227c490c@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [09/37] lucenenet git commit: Lucene.Net.Codecs.Bloom.FuzzySet.ContainsResult refactor > Maybe > MAYBE, No > NO archived-at: Sun, 29 Jan 2017 13:27:25 -0000 Lucene.Net.Codecs.Bloom.FuzzySet.ContainsResult refactor > Maybe > MAYBE, No > NO Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/7586bb8a Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/7586bb8a Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/7586bb8a Branch: refs/heads/api-work Commit: 7586bb8ab505ad7da00b5ba6c68057510a8031d1 Parents: 20967c4 Author: Shad Storhaug Authored: Sun Jan 29 14:39:43 2017 +0700 Committer: Shad Storhaug Committed: Sun Jan 29 14:39:43 2017 +0700 ---------------------------------------------------------------------- src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs | 2 +- src/Lucene.Net.Codecs/Bloom/FuzzySet.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7586bb8a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs index 4ee86e6..96024a8 100644 --- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs +++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs @@ -340,7 +340,7 @@ namespace Lucene.Net.Codecs.Bloom // structure // that may occasionally give a false positive but guaranteed no false // negatives - if (filter.Contains(text) == FuzzySet.ContainsResult.No) + if (filter.Contains(text) == FuzzySet.ContainsResult.NO) { return false; } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7586bb8a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs b/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs index 16e1104..d3ac42b 100644 --- a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs +++ b/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs @@ -69,8 +69,8 @@ namespace Lucene.Net.Codecs.Bloom /// public enum ContainsResult { - Maybe, // LUCENENET TODO: Change to MAYBE, NO - No + MAYBE, + NO }; private readonly HashFunction _hashFunction; @@ -226,7 +226,7 @@ namespace Lucene.Net.Codecs.Bloom // Bloom sizes are always base 2 and so can be ANDed for a fast modulo var pos = positiveHash & _bloomSize; - return _filter.Get(pos) ? ContainsResult.Maybe : ContainsResult.No; + return _filter.Get(pos) ? ContainsResult.MAYBE : ContainsResult.NO; } ///