lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [09/37] lucenenet git commit: Lucene.Net.Codecs.Bloom.FuzzySet.ContainsResult refactor > Maybe > MAYBE, No > NO
Date Sun, 29 Jan 2017 13:27:31 GMT
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 <shad@shadstorhaug.com>
Authored: Sun Jan 29 14:39:43 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
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
         /// </remarks>
         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;
         }
 
         /// <summary>


Mime
View raw message