lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [01/27] lucenenet git commit: Lucene.Net.Analysis.Miscellaneous.KeywordMarkerFilter refactor: IsKeyword > IsKeyword() (makes a conversion)
Date Sun, 05 Feb 2017 16:51:36 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/api-work ab81d9131 -> f71dfb400


Lucene.Net.Analysis.Miscellaneous.KeywordMarkerFilter refactor: IsKeyword > IsKeyword()
(makes a conversion)


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

Branch: refs/heads/api-work
Commit: 2ae5a27e4b087fd1f6a4e71c76cab2589e157c33
Parents: ab81d91
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Feb 5 14:45:23 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Feb 5 14:47:45 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Miscellaneous/KeywordMarkerFilter.cs           | 4 ++--
 .../Analysis/Miscellaneous/PatternKeywordMarkerFilter.cs    | 9 +++------
 .../Analysis/Miscellaneous/SetKeywordMarkerFilter.cs        | 7 ++-----
 3 files changed, 7 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2ae5a27e/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordMarkerFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordMarkerFilter.cs
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordMarkerFilter.cs
index 83adbda..b5a8117 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordMarkerFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordMarkerFilter.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
         {
             if (m_input.IncrementToken())
             {
-                if (IsKeyword)
+                if (IsKeyword())
                 {
                     keywordAttr.IsKeyword = true;
                 }
@@ -52,6 +52,6 @@ namespace Lucene.Net.Analysis.Miscellaneous
             }
         }
 
-        protected abstract bool IsKeyword { get; } // LUCENENET TODO: Change to IsKeyword()
?
+        protected abstract bool IsKeyword();
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2ae5a27e/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternKeywordMarkerFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternKeywordMarkerFilter.cs
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternKeywordMarkerFilter.cs
index 10ea4a4..a9166dd 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternKeywordMarkerFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternKeywordMarkerFilter.cs
@@ -50,13 +50,10 @@ namespace Lucene.Net.Analysis.Miscellaneous
             this.pattern = pattern;
         }
 
-        protected override bool IsKeyword
+        protected override bool IsKeyword()
         {
-            get
-            {
-                matcher = pattern.Match(termAtt.ToString()); 
-                return matcher.Success;
-            }
+            matcher = pattern.Match(termAtt.ToString()); 
+            return matcher.Success;
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2ae5a27e/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/SetKeywordMarkerFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/SetKeywordMarkerFilter.cs
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/SetKeywordMarkerFilter.cs
index 769de5e..ee13614 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/SetKeywordMarkerFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/SetKeywordMarkerFilter.cs
@@ -46,12 +46,9 @@ namespace Lucene.Net.Analysis.Miscellaneous
             termAtt = AddAttribute<ICharTermAttribute>();
         }
 
-        protected override bool IsKeyword
+        protected override bool IsKeyword()
         {
-            get
-            {
-                return keywordSet.Contains(termAtt.Buffer, 0, termAtt.Length);
-            }
+            return keywordSet.Contains(termAtt.Buffer, 0, termAtt.Length);
         }
     }
 }
\ No newline at end of file


Mime
View raw message