You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2016/10/02 14:35:33 UTC

[15/50] [abbrv] lucenenet git commit: Fixed string comparison in SuggestWordScoreComparator to match that of Java.

Fixed string comparison in SuggestWordScoreComparator to match that of Java.


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

Branch: refs/heads/master
Commit: 006d8052792c166adec9aca360c43be1ccc101e3
Parents: e3a9a20
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Sep 16 01:52:40 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Oct 2 17:44:23 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Suggest/Spell/SuggestWordScoreComparator.cs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/006d8052/src/Lucene.Net.Suggest/Spell/SuggestWordScoreComparator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Spell/SuggestWordScoreComparator.cs b/src/Lucene.Net.Suggest/Spell/SuggestWordScoreComparator.cs
index 341589b..3d875db 100644
--- a/src/Lucene.Net.Suggest/Spell/SuggestWordScoreComparator.cs
+++ b/src/Lucene.Net.Suggest/Spell/SuggestWordScoreComparator.cs
@@ -1,4 +1,5 @@
-\ufeffusing System.Collections.Generic;
+\ufeffusing Lucene.Net.Support;
+using System.Collections.Generic;
 
 namespace Lucene.Net.Search.Spell
 {
@@ -56,7 +57,7 @@ namespace Lucene.Net.Search.Spell
                 return -1;
             }
             // third criteria: term text
-            return second.String.CompareTo(first.String);
+            return second.String.CompareToOrdinal(first.String);
         }
     }
 }
\ No newline at end of file