lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [24/39] lucenenet git commit: Lucene.Net.Analysis.Miscellaneous.StemmerOverrideFilter refactor: BytesReader > GetBytesReader() (returns new instance)
Date Sat, 04 Feb 2017 20:32:43 GMT
Lucene.Net.Analysis.Miscellaneous.StemmerOverrideFilter refactor: BytesReader > GetBytesReader()
(returns new instance)


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

Branch: refs/heads/api-work
Commit: de106d905c8c29d239bacd85d3cc27cc5218e171
Parents: 0697c7a
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Feb 5 00:59:11 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Feb 5 00:59:11 2017 +0700

----------------------------------------------------------------------
 .../Miscellaneous/StemmerOverrideFilter.cs       | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/de106d90/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
index d0f6618..2eec23f 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
               : base(input)
         {
             this.stemmerOverrideMap = stemmerOverrideMap;
-            fstReader = stemmerOverrideMap.BytesReader;
+            fstReader = stemmerOverrideMap.GetBytesReader();
             termAtt = AddAttribute<ICharTermAttribute>();
             keywordAtt = AddAttribute<IKeywordAttribute>();
         }
@@ -109,18 +109,15 @@ namespace Lucene.Net.Analysis.Miscellaneous
             /// <summary>
             /// Returns a <see cref="FST.BytesReader"/> to pass to the <see cref="Get(char[],
int, FST.Arc{BytesRef}, FST.BytesReader)"/> method.
             /// </summary>
-            public FST.BytesReader BytesReader // LUCENENET TODO: Change to GetBytesReader()
+            public FST.BytesReader GetBytesReader()
             {
-                get
+                if (fst == null)
                 {
-                    if (fst == null)
-                    {
-                        return null;
-                    }
-                    else
-                    {
-                        return fst.GetBytesReader();
-                    }
+                    return null;
+                }
+                else
+                {
+                    return fst.GetBytesReader();
                 }
             }
 


Mime
View raw message