lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [08/37] lucenenet git commit: Lucene.Net.Codecs.Bloom.BloomFilteringPostingsFormat.BloomFilteredTermsEnum refactor: renamed DELEGATE_TERMS_ENUM > delegateTermsEnum, FILTER > filter
Date Sun, 29 Jan 2017 13:27:30 GMT
Lucene.Net.Codecs.Bloom.BloomFilteringPostingsFormat.BloomFilteredTermsEnum refactor: renamed
DELEGATE_TERMS_ENUM > delegateTermsEnum, FILTER > filter


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

Branch: refs/heads/api-work
Commit: 20967c4f3320327624caaddf54239362b3db6c63
Parents: 9b5fd73
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Jan 29 14:38:20 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Jan 29 14:38:20 2017 +0700

----------------------------------------------------------------------
 .../Bloom/BloomFilteringPostingsFormat.cs           | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/20967c4f/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 4be901a..4ee86e6 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -241,8 +241,8 @@ namespace Lucene.Net.Codecs.Bloom
 
                     // We have been handed something we cannot reuse (either null, wrong
                     // class or wrong filter) so allocate a new object
-                    if (bfte.FILTER != _filter) return new BloomFilteredTermsEnum(_delegateTerms,
reuse, _filter);
-                    bfte.Reset(_delegateTerms, bfte.DELEGATE_TERMS_ENUM);
+                    if (bfte.filter != _filter) return new BloomFilteredTermsEnum(_delegateTerms,
reuse, _filter);
+                    bfte.Reset(_delegateTerms, bfte.delegateTermsEnum);
                     return bfte;
                     
                 }
@@ -296,22 +296,22 @@ namespace Lucene.Net.Codecs.Bloom
             internal sealed class BloomFilteredTermsEnum : TermsEnum
             {
                 private Terms _delegateTerms;
-                internal TermsEnum DELEGATE_TERMS_ENUM;
+                internal TermsEnum delegateTermsEnum;
                 private TermsEnum _reuseDelegate;
-                internal readonly FuzzySet FILTER; // LUCENENET TODO: rename filter
+                internal readonly FuzzySet filter; 
 
                 public BloomFilteredTermsEnum(Terms delegateTerms, TermsEnum reuseDelegate,
FuzzySet filter)
                 {
                     _delegateTerms = delegateTerms;
                     _reuseDelegate = reuseDelegate;
-                    this.FILTER = filter;
+                    this.filter = filter;
                 }
 
                 internal void Reset(Terms delegateTerms, TermsEnum reuseDelegate)
                 {
                     _delegateTerms = delegateTerms;
                     _reuseDelegate = reuseDelegate;
-                    DELEGATE_TERMS_ENUM = null;
+                    delegateTermsEnum = null;
                 }
 
                 private TermsEnum Delegate() // LUCENENET TODO: Make property
@@ -320,7 +320,7 @@ namespace Lucene.Net.Codecs.Bloom
                     // this can be a relativly heavy operation depending on the 
                     // delegate postings format and they underlying directory
                     // (clone IndexInput)
-                    return DELEGATE_TERMS_ENUM ?? (DELEGATE_TERMS_ENUM = _delegateTerms.GetIterator(_reuseDelegate));
+                    return delegateTermsEnum ?? (delegateTermsEnum = _delegateTerms.GetIterator(_reuseDelegate));
                 }
 
                 public override sealed BytesRef Next()
@@ -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;
                     }


Mime
View raw message