lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [10/10] lucenenet git commit: Reviewed and removed various TODOs
Date Fri, 13 Oct 2017 11:10:07 GMT
Reviewed and removed various TODOs


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

Branch: refs/heads/master
Commit: d5ea2010abe7404a702f7e319d249024a0623d67
Parents: 21522f3
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Oct 5 04:22:35 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Oct 5 04:44:20 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Queries/Function/ValueSources/EnumFieldSource.cs  | 2 --
 .../Flexible/Core/Nodes/ProximityQueryNode.cs                    | 2 +-
 .../Flexible/Standard/Nodes/NumericQueryNode.cs                  | 2 +-
 src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs                  | 2 +-
 src/Lucene.Net.Tests.Grouping/TestGrouping.cs                    | 4 ++--
 .../Flexible/Core/Builders/TestQueryTreeBuilder.cs               | 1 -
 .../Flexible/Precedence/TestPrecedenceQueryParser.cs             | 2 +-
 7 files changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5ea2010/src/Lucene.Net.Queries/Function/ValueSources/EnumFieldSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/EnumFieldSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/EnumFieldSource.cs
index cddbb4c..b8dfe92 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/EnumFieldSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/EnumFieldSource.cs
@@ -310,7 +310,6 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
             EnumFieldSource that = (EnumFieldSource)o;
 
-            // LUCENENET TODO: Make an EquatableDictionary so we can use Equatable.Wrap()
here ?
             // LUCENENET specific: must use Collections.Equals() to ensure values
             // contained within the dictionaries are compared for equality
             if (!Collections.Equals(enumIntToStringMap, that.enumIntToStringMap))
@@ -333,7 +332,6 @@ namespace Lucene.Net.Queries.Function.ValueSources
         {
             int result = base.GetHashCode();
             result = 31 * result + parser.GetHashCode();
-            // LUCENENET TODO: Make an EquatableDictionary so we can use Equatable.Wrap()
here ?
             // LUCENENET specific: must use Collections.GetHashCode() to ensure values
             // contained within the dictionaries are compared for equality
             result = 31 * result + Collections.GetHashCode(enumIntToStringMap);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5ea2010/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ProximityQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ProximityQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ProximityQueryNode.cs
index 3781a82..b9ca019 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ProximityQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ProximityQueryNode.cs
@@ -198,7 +198,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             set { this.field = value; }
         }
 
-        // LUCENENET TODO: This method is not required because Field is already a string
property
+        // LUCENENET specific: This method is technically not required because Field is already
a string property, not ICharSequence
         /// <summary>
         /// Gets the field as a string. Returns null if the field was not specified in the
query string.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5ea2010/src/Lucene.Net.QueryParser/Flexible/Standard/Nodes/NumericQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Nodes/NumericQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Nodes/NumericQueryNode.cs
index 50e988f..4bcb813 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Standard/Nodes/NumericQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Nodes/NumericQueryNode.cs
@@ -28,7 +28,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Nodes
     /// <see cref="object"/> representing a .NET numeric type.
     /// </summary>
     /// <seealso cref="Standard.Config.NumericConfig"/>
-    public class NumericQueryNode : QueryNode, IFieldValuePairQueryNode<object> //
LUCENENET TODO: Can we use Decimal??
+    public class NumericQueryNode : QueryNode, IFieldValuePairQueryNode<object>
     {
         private NumberFormat numberFormat;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5ea2010/src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs b/src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs
index 61a13a3..2686a7a 100644
--- a/src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs
@@ -66,7 +66,7 @@ namespace Lucene.Net.Search.Suggest.Tst
 #pragma warning restore 612, 618
 
             List<string> tokens = new List<string>();
-            List<object> vals = new List<object>(); // LUCENENET TODO: Should
this be long? in Java it was Number, but we can probably do better than object
+            List<object> vals = new List<object>();
             BytesRef spare;
             CharsRef charsSpare = new CharsRef();
             while ((spare = tfit.Next()) != null)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5ea2010/src/Lucene.Net.Tests.Grouping/TestGrouping.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Grouping/TestGrouping.cs b/src/Lucene.Net.Tests.Grouping/TestGrouping.cs
index 6e26fc1..61c6df9 100644
--- a/src/Lucene.Net.Tests.Grouping/TestGrouping.cs
+++ b/src/Lucene.Net.Tests.Grouping/TestGrouping.cs
@@ -550,7 +550,7 @@ namespace Lucene.Net.Search.Grouping
 
             IComparer<GroupDoc> groupSortComp = GetComparer(groupSort);
 
-            // LUCENENET TODO: The original Java API Arrays.Sort does not currently exist.
+            // LUCENENET specific: The original Java API Arrays.Sort does not currently exist.
             // This call ultimately results in calling TimSort, which is why this line was
replaced
             // with ArrayUtil.TimSort(T[], IComparer<T>).
             //
@@ -620,7 +620,7 @@ namespace Lucene.Net.Search.Grouping
                 List<GroupDoc> docs = groups[group];
                 totalGroupedHitCount += docs.size();
 
-                // LUCENENET TODO: The original API Collections.Sort does not currently exist.
+                // LUCENENET specific: The original API Collections.Sort does not currently
exist.
                 // This call ultimately results in calling TimSort, which is why this line
was replaced
                 // with CollectionUtil.TimSort(IList<T>, IComparer<T>).
                 //

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5ea2010/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Builders/TestQueryTreeBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Builders/TestQueryTreeBuilder.cs
b/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Builders/TestQueryTreeBuilder.cs
index 625b84c..76a442f 100644
--- a/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Builders/TestQueryTreeBuilder.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Core/Builders/TestQueryTreeBuilder.cs
@@ -29,7 +29,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Builders
         [Test]
         public virtual void TestSetFieldBuilder()
         {
-            // LUCENENET TODO: Make additional non-generic QueryTreeBuilder of type object?
             QueryTreeBuilder<object> qtb = new QueryTreeBuilder<object>();
             qtb.SetBuilder("field", new DummyBuilder());
             Object result = qtb.Build(new FieldQueryNode(new UnescapedCharSequence("field").ToString(),
"foo", 0, 0));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d5ea2010/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
b/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
index 2c4da33..5b50ec5 100644
--- a/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Flexible/Precedence/TestPrecedenceQueryParser.cs
@@ -145,7 +145,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Precedence
                 a = new MockAnalyzer(Random(), MockTokenizer.SIMPLE, true);
             PrecedenceQueryParser qp = new PrecedenceQueryParser();
             qp.Analyzer = (a);
-            qp.DefaultOperator = (StandardQueryConfigHandler.Operator.OR); // LUCENENET TODO:
Change API back to the way it was..?
+            qp.DefaultOperator = (StandardQueryConfigHandler.Operator.OR);
             return qp;
         }
 


Mime
View raw message