lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [31/53] [abbrv] lucenenet git commit: Lucene.Net.Analysis.Common: Renamed all type-derived classes and interfaces from Short, Int, Long, and Float to match CLR types Int16, Int32, Int64, and Single, respectively.
Date Wed, 08 Feb 2017 14:32:10 GMT
Lucene.Net.Analysis.Common: Renamed all type-derived classes and interfaces from Short, Int,
Long, and Float to match CLR types Int16, Int32, Int64, and Single, respectively.


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

Branch: refs/heads/api-work
Commit: 0ff79884cb1d74ac48348ec2eb47c25e8444de5a
Parents: 8b7f418
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Feb 8 02:22:33 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Feb 8 21:08:22 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Payloads/DelimitedPayloadTokenFilterFactory.cs      | 2 +-
 src/Lucene.Net.Analysis.Common/Analysis/Payloads/FloatEncoder.cs | 4 +++-
 .../Analysis/Payloads/DelimitedPayloadTokenFilterTest.cs         | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ff79884/src/Lucene.Net.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterFactory.cs
b/src/Lucene.Net.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterFactory.cs
index 429e9a8..20a85ea 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterFactory.cs
@@ -62,7 +62,7 @@ namespace Lucene.Net.Analysis.Payloads
         {
             if (encoderClass.Equals("float"))
             {
-                encoder = new FloatEncoder();
+                encoder = new SingleEncoder();
             }
             else if (encoderClass.Equals("integer"))
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ff79884/src/Lucene.Net.Analysis.Common/Analysis/Payloads/FloatEncoder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Payloads/FloatEncoder.cs b/src/Lucene.Net.Analysis.Common/Analysis/Payloads/FloatEncoder.cs
index 9e451e7..4810d9d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Payloads/FloatEncoder.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Payloads/FloatEncoder.cs
@@ -22,9 +22,11 @@ namespace Lucene.Net.Analysis.Payloads
 
     /// <summary>
     /// Encode a character array <see cref="float"/> as a <see cref="BytesRef"/>.
+    /// <para/>
+    /// NOTE: This was FloatEncoder in Lucene
     /// </summary>
     /// <seealso cref="PayloadHelper.EncodeSingle(float, byte[], int)"/>
-    public class FloatEncoder : AbstractEncoder, IPayloadEncoder
+    public class SingleEncoder : AbstractEncoder, IPayloadEncoder
     {
         public override BytesRef Encode(char[] buffer, int offset, int length)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ff79884/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterTest.cs
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterTest.cs
index f5681f0..5a66ae9 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterTest.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterTest.cs
@@ -76,7 +76,7 @@ namespace Lucene.Net.Analysis.Payloads
         public virtual void TestFloatEncoding()
         {
             string test = "The quick|1.0 red|2.0 fox|3.5 jumped|0.5 over the lazy|5 brown|99.3
dogs|83.7";
-            DelimitedPayloadTokenFilter filter = new DelimitedPayloadTokenFilter(new MockTokenizer(new
StringReader(test), MockTokenizer.WHITESPACE, false), '|', new FloatEncoder());
+            DelimitedPayloadTokenFilter filter = new DelimitedPayloadTokenFilter(new MockTokenizer(new
StringReader(test), MockTokenizer.WHITESPACE, false), '|', new SingleEncoder());
             ICharTermAttribute termAtt = filter.GetAttribute<ICharTermAttribute>();
             IPayloadAttribute payAtt = filter.GetAttribute<IPayloadAttribute>();
             filter.Reset();


Mime
View raw message