lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [22/46] lucenenet git commit: Fixed string CompareTo to match Java
Date Tue, 04 Oct 2016 20:01:52 GMT
Fixed string CompareTo to match Java


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

Branch: refs/heads/master
Commit: e76ee907c4302bc1765847892ca790153dd845fe
Parents: 8d23d13
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Sep 25 14:17:24 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Mon Oct 3 23:31:23 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs | 5 +++--
 src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs                   | 2 +-
 src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs                     | 2 +-
 src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs                 | 5 +++--
 4 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e76ee907/src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs b/src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs
index 057d274..95ee9d1 100644
--- a/src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs
+++ b/src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs
@@ -1,4 +1,5 @@
-using System;
+using Lucene.Net.Support;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 
@@ -329,7 +330,7 @@ namespace Lucene.Net.Facet.SortedSet
                 }
                 else
                 {
-                    return a.Dim.CompareTo(b.Dim);
+                    return a.Dim.CompareToOrdinal(b.Dim);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e76ee907/src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs b/src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs
index f168e87..ae177b6 100644
--- a/src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs
@@ -134,7 +134,7 @@ namespace Lucene.Net.Facet.Taxonomy
             int len = Length < other.Length ? Length : other.Length;
             for (int i = 0, j = 0; i < len; i++, j++)
             {
-                int cmp = Components[i].CompareTo(other.Components[j]);
+                int cmp = Components[i].CompareToOrdinal(other.Components[j]);
                 if (cmp < 0) // this is 'before'
                 {
                     return -1;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e76ee907/src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs b/src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs
index 26dc493..edc68c0 100644
--- a/src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs
@@ -114,7 +114,7 @@ namespace Lucene.Net.Facet.Taxonomy
             int len = Length < other.Length ? Length : other.Length;
             for (int i = 0, j = 0; i < len; i++, j++)
             {
-                int cmp = Components[i].CompareTo(other.Components[j]);
+                int cmp = Components[i].CompareToOrdinal(other.Components[j]);
                 if (cmp < 0)
                 {
                     return -1; // this is 'before'

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e76ee907/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs
index c0ae758..1a53994 100644
--- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs
@@ -1,4 +1,5 @@
-using System;
+using Lucene.Net.Support;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 
@@ -47,7 +48,7 @@ namespace Lucene.Net.Facet.Taxonomy
                 }
                 else
                 {
-                    return a.Dim.CompareTo(b.Dim);
+                    return a.Dim.CompareToOrdinal(b.Dim);
                 }
             }
         }


Mime
View raw message