lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [17/53] [abbrv] lucenenet git commit: Lucene.Net.Queries: Renamed all type-derived properties and methods from Short, Int, Long, and Float to match CLR types Int16, Int32, Int64, and Single, respectively.
Date Wed, 08 Feb 2017 14:31:56 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ec70857f/src/Lucene.Net.Suggest/Suggest/DocumentValueSourceDictionary.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/DocumentValueSourceDictionary.cs b/src/Lucene.Net.Suggest/Suggest/DocumentValueSourceDictionary.cs
index ae45105..987ab46 100644
--- a/src/Lucene.Net.Suggest/Suggest/DocumentValueSourceDictionary.cs
+++ b/src/Lucene.Net.Suggest/Suggest/DocumentValueSourceDictionary.cs
@@ -158,7 +158,7 @@ namespace Lucene.Net.Search.Suggest
                         throw new Exception();
                     }
                 }
-                return currentWeightValues.LongVal(docId - starts[subIndex]);
+                return currentWeightValues.Int64Val(docId - starts[subIndex]);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ec70857f/src/Lucene.Net.Tests.Expressions/TestExpressionValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestExpressionValueSource.cs b/src/Lucene.Net.Tests.Expressions/TestExpressionValueSource.cs
index 7df6dd5..a088eae 100644
--- a/src/Lucene.Net.Tests.Expressions/TestExpressionValueSource.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestExpressionValueSource.cs
@@ -72,26 +72,26 @@ namespace Lucene.Net.Tests.Expressions
 			AtomicReaderContext leaf = reader.Leaves[0];
 			FunctionValues values = vs.GetValues(new Dictionary<string, object>(), leaf);
 			AreEqual(10, values.DoubleVal(0), 0);
-			AreEqual(10, values.FloatVal(0), 0);
-			AreEqual(10, values.LongVal(0));
-			AreEqual(10, values.IntVal(0));
-			AreEqual(10, values.ShortVal(0));
+			AreEqual(10, values.SingleVal(0), 0);
+			AreEqual(10, values.Int64Val(0));
+			AreEqual(10, values.Int32Val(0));
+			AreEqual(10, values.Int16Val(0));
 			AreEqual(10, values.ByteVal(0));
 			AreEqual("10", values.StrVal(0));
 			AreEqual(System.Convert.ToDouble(10), values.ObjectVal(0));
 			AreEqual(40, values.DoubleVal(1), 0);
-			AreEqual(40, values.FloatVal(1), 0);
-			AreEqual(40, values.LongVal(1));
-			AreEqual(40, values.IntVal(1));
-			AreEqual(40, values.ShortVal(1));
+			AreEqual(40, values.SingleVal(1), 0);
+			AreEqual(40, values.Int64Val(1));
+			AreEqual(40, values.Int32Val(1));
+			AreEqual(40, values.Int16Val(1));
 			AreEqual(40, values.ByteVal(1));
 			AreEqual("40", values.StrVal(1));
 			AreEqual(System.Convert.ToDouble(40), values.ObjectVal(1));
 			AreEqual(4, values.DoubleVal(2), 0);
-			AreEqual(4, values.FloatVal(2), 0);
-			AreEqual(4, values.LongVal(2));
-			AreEqual(4, values.IntVal(2));
-			AreEqual(4, values.ShortVal(2));
+			AreEqual(4, values.SingleVal(2), 0);
+			AreEqual(4, values.Int64Val(2));
+			AreEqual(4, values.Int32Val(2));
+			AreEqual(4, values.Int16Val(2));
 			AreEqual(4, values.ByteVal(2));
 			AreEqual("4", values.StrVal(2));
 			AreEqual(System.Convert.ToDouble(4), values.ObjectVal(2));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ec70857f/src/Lucene.Net.Tests.Queries/Function/TestDocValuesFieldSources.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/Function/TestDocValuesFieldSources.cs b/src/Lucene.Net.Tests.Queries/Function/TestDocValuesFieldSources.cs
index b8afb3f..1692996 100644
--- a/src/Lucene.Net.Tests.Queries/Function/TestDocValuesFieldSources.cs
+++ b/src/Lucene.Net.Tests.Queries/Function/TestDocValuesFieldSources.cs
@@ -108,7 +108,7 @@ namespace Lucene.Net.Tests.Queries.Function
                         throw new InvalidOperationException();
                     }
 
-                    object expected = vals[ids.IntVal(i)];
+                    object expected = vals[ids.Int32Val(i)];
                     switch (type)
                     {
                         case DocValuesType.SORTED:
@@ -124,7 +124,7 @@ namespace Lucene.Net.Tests.Queries.Function
                             assertEquals(new BytesRef((string)expected), bytes);
                             break;
                         case DocValuesType.NUMERIC:
-                            assertEquals(Convert.ToInt64(expected, CultureInfo.InvariantCulture),
values.LongVal(i));
+                            assertEquals(Convert.ToInt64(expected, CultureInfo.InvariantCulture),
values.Int64Val(i));
                             break;
                     }
                 }


Mime
View raw message