lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [15/50] [abbrv] lucenenet git commit: SWEEP: Lucene.Net.Core + Lucene.Net.TestFramework: Changed all string CompareTo() to CompareToOrdinal() and all string Equals() to specify StringComparison.Ordinal
Date Wed, 15 Mar 2017 23:49:57 GMT
SWEEP: Lucene.Net.Core + Lucene.Net.TestFramework: Changed all string CompareTo() to CompareToOrdinal() and all string Equals() to specify StringComparison.Ordinal


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

Branch: refs/heads/api-work
Commit: b86fc3ba48f6e483768d198fe1caddd6801e23cd
Parents: ea2cda6
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Tue Mar 14 20:43:25 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Tue Mar 14 22:04:27 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Analysis/Token.cs           | 14 ++++-
 .../Analysis/TokenAttributes/TypeAttribute.cs   |  2 +-
 .../Codecs/BlockTreeTermsReader.cs              |  2 +-
 .../Codecs/BlockTreeTermsWriter.cs              |  8 +--
 src/Lucene.Net.Core/Codecs/CodecUtil.cs         |  2 +-
 .../Codecs/Lucene3x/Lucene3xFields.cs           |  6 +-
 .../Lucene3x/Lucene3xSegmentInfoReader.cs       |  2 +-
 .../Codecs/Lucene3x/TermBuffer.cs               |  8 ++-
 .../Codecs/Lucene3x/TermInfosReader.cs          |  5 +-
 .../Codecs/Lucene3x/TermInfosReaderIndex.cs     |  4 +-
 .../Lucene40/Lucene40TermVectorsWriter.cs       |  3 +-
 src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs |  3 +-
 .../Index/BufferedUpdatesStream.cs              |  4 +-
 src/Lucene.Net.Core/Index/CheckIndex.cs         | 12 ++--
 src/Lucene.Net.Core/Index/DirectoryReader.cs    |  5 +-
 src/Lucene.Net.Core/Index/DocFieldProcessor.cs  |  5 +-
 src/Lucene.Net.Core/Index/FieldInfos.cs         | 16 ++---
 .../Index/FreqProxTermsWriterPerField.cs        |  2 +-
 src/Lucene.Net.Core/Index/IndexFileDeleter.cs   | 12 ++--
 src/Lucene.Net.Core/Index/IndexUpgrader.cs      |  6 +-
 .../Index/LiveIndexWriterConfig.cs              |  2 +-
 .../Index/NormsConsumerPerField.cs              |  3 +-
 .../Index/PersistentSnapshotDeletionPolicy.cs   |  2 +-
 src/Lucene.Net.Core/Index/PrefixCodedTerms.cs   |  2 +-
 src/Lucene.Net.Core/Index/SegmentInfo.cs        |  2 +-
 src/Lucene.Net.Core/Index/SegmentInfos.cs       |  6 +-
 .../Index/StandardDirectoryReader.cs            |  2 +-
 src/Lucene.Net.Core/Index/Term.cs               |  3 +-
 .../Index/TermVectorsConsumer.cs                |  2 +-
 src/Lucene.Net.Core/Index/TieredMergePolicy.cs  |  2 +-
 .../Index/UpgradeIndexMergePolicy.cs            |  3 +-
 src/Lucene.Net.Core/Search/AutomatonQuery.cs    |  3 +-
 .../Search/DocTermOrdsRangeFilter.cs            |  2 +-
 src/Lucene.Net.Core/Search/FieldCacheImpl.cs    |  2 +-
 .../Search/FieldCacheRangeFilter.cs             |  2 +-
 src/Lucene.Net.Core/Search/FieldValueFilter.cs  |  3 +-
 src/Lucene.Net.Core/Search/FuzzyQuery.cs        |  2 +-
 src/Lucene.Net.Core/Search/MultiPhraseQuery.cs  |  4 +-
 src/Lucene.Net.Core/Search/MultiTermQuery.cs    |  3 +-
 src/Lucene.Net.Core/Search/NumericRangeQuery.cs |  2 +-
 .../Search/Payloads/PayloadNearQuery.cs         |  3 +-
 src/Lucene.Net.Core/Search/PhraseQuery.cs       |  4 +-
 src/Lucene.Net.Core/Search/PrefixQuery.cs       |  3 +-
 src/Lucene.Net.Core/Search/RegexpQuery.cs       |  3 +-
 src/Lucene.Net.Core/Search/SortField.cs         |  5 +-
 .../Search/Spans/FieldMaskingSpanQuery.cs       |  3 +-
 .../Search/Spans/SpanNearQuery.cs               |  3 +-
 .../Search/Spans/SpanNotQuery.cs                |  2 +-
 src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs |  4 +-
 .../Search/Spans/SpanTermQuery.cs               |  2 +-
 src/Lucene.Net.Core/Search/TermQuery.cs         |  3 +-
 src/Lucene.Net.Core/Search/TermRangeQuery.cs    |  7 ++-
 src/Lucene.Net.Core/Search/WildcardQuery.cs     |  3 +-
 src/Lucene.Net.Core/Store/FSDirectory.cs        |  2 +-
 .../Store/NRTCachingDirectory.cs                |  2 +-
 .../Support/StringCharSequenceWrapper.cs        |  8 ++-
 .../Support/StringCharacterIterator.cs          |  2 +-
 .../Util/Automaton/BasicOperations.cs           |  8 +--
 src/Lucene.Net.Core/Util/Constants.cs           |  2 +-
 .../Util/FieldCacheSanityChecker.cs             |  3 +-
 src/Lucene.Net.Core/Util/MergedIterator.cs      | 12 +++-
 src/Lucene.Net.Core/Util/StringHelper.cs        |  2 +-
 src/Lucene.Net.Core/Util/UnicodeUtil.cs         |  8 +--
 .../Analysis/BaseTokenStreamTestCase.cs         |  7 ++-
 .../Analysis/MockReaderWrapper.cs               |  2 +-
 .../Lucene3x/PreFlexRWTermVectorsWriter.cs      |  3 +-
 .../Codecs/Lucene3x/TermInfosWriter.cs          |  7 ++-
 .../Codecs/Lucene40/Lucene40PostingsWriter.cs   |  2 +-
 .../Codecs/RAMOnly/RAMOnlyPostingsFormat.cs     |  2 +-
 .../Index/BaseDocValuesFormatTestCase.cs        |  6 +-
 .../Index/BaseStoredFieldsFormatTestCase.cs     |  4 +-
 .../Index/RandomIndexWriter.cs                  |  6 +-
 .../ThreadedIndexingAndSearchingTestCase.cs     |  4 +-
 .../Search/CheckHits.cs                         |  2 +-
 .../Search/ShardSearchingTestBase.cs            |  2 +-
 .../Store/MockDirectoryWrapper.cs               | 12 ++--
 .../Util/LuceneTestCase.cs                      | 30 +++++++---
 .../Util/StackTraceHelper.cs                    |  4 +-
 .../Util/TestRuleSetupAndRestoreClassEnv.cs     | 61 +++++++++++---------
 src/Lucene.Net.TestFramework/Util/TestUtil.cs   |  6 +-
 .../Util/VirtualMethod.cs                       |  2 +-
 81 files changed, 252 insertions(+), 177 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Analysis/Token.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Analysis/Token.cs b/src/Lucene.Net.Core/Analysis/Token.cs
index e0cb10f..ede0cad 100644
--- a/src/Lucene.Net.Core/Analysis/Token.cs
+++ b/src/Lucene.Net.Core/Analysis/Token.cs
@@ -424,10 +424,18 @@ namespace Lucene.Net.Analysis
                 return true;
             }
 
-            var other = obj as Token;
-            if (other != null)
+            
+            if (obj is Token)
             {
-                return (startOffset == other.startOffset && endOffset == other.endOffset && flags == other.flags && positionIncrement == other.positionIncrement && (type == null ? other.type == null : type.Equals(other.type)) && (payload == null ? other.payload == null : payload.Equals(other.payload)) && base.Equals(obj));
+                var other = (Token)obj;
+                return (startOffset == other.startOffset && 
+                    endOffset == other.endOffset && 
+                    flags == other.flags && 
+                    positionIncrement == other.positionIncrement && 
+                    (type == null ? other.type == null : type.Equals(other.type, System.StringComparison.Ordinal)) && 
+                    (payload == null ? other.payload == null : payload.Equals(other.payload)) && 
+                    base.Equals(obj)
+                );
             }
             else
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Analysis/TokenAttributes/TypeAttribute.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Analysis/TokenAttributes/TypeAttribute.cs b/src/Lucene.Net.Core/Analysis/TokenAttributes/TypeAttribute.cs
index fd9ebb3..86ebc5d 100644
--- a/src/Lucene.Net.Core/Analysis/TokenAttributes/TypeAttribute.cs
+++ b/src/Lucene.Net.Core/Analysis/TokenAttributes/TypeAttribute.cs
@@ -66,7 +66,7 @@ namespace Lucene.Net.Analysis.TokenAttributes
             if (other is TypeAttribute)
             {
                 TypeAttribute o = (TypeAttribute)other;
-                return (this.type == null ? o.type == null : this.type.Equals(o.type));
+                return (this.type == null ? o.type == null : this.type.Equals(o.type, StringComparison.Ordinal));
             }
 
             return false;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs b/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
index 1b8979e..2ef4809 100644
--- a/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
+++ b/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
@@ -558,7 +558,7 @@ namespace Lucene.Net.Codecs
                 this.outerInstance = outerInstance;
                 Debug.Assert(numTerms > 0);
                 this.fieldInfo = fieldInfo;
-                //DEBUG = BlockTreeTermsReader.DEBUG && fieldInfo.name.equals("id");
+                //DEBUG = BlockTreeTermsReader.DEBUG && fieldInfo.name.Equals("id", StringComparison.Ordinal);
                 this.numTerms = numTerms;
                 this.sumTotalTermFreq = sumTotalTermFreq;
                 this.sumDocFreq = sumDocFreq;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs b/src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs
index b026cbf..e81cf1f 100644
--- a/src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs
@@ -306,7 +306,7 @@ namespace Lucene.Net.Codecs
                 this.maxItemsInBlock = maxItemsInBlock;
                 WriteHeader(@out);
 
-                //DEBUG = state.segmentName.equals("_4a");
+                //DEBUG = state.segmentName.Equals("_4a", StringComparison.Ordinal);
 
                 string termsIndexFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, TERMS_INDEX_EXTENSION);
                 indexOut = state.Directory.CreateOutput(termsIndexFileName, state.Context);
@@ -361,9 +361,9 @@ namespace Lucene.Net.Codecs
 
         public override TermsConsumer AddField(FieldInfo field)
         {
-            //DEBUG = field.name.equals("id");
+            //DEBUG = field.name.Equals("id", StringComparison.Ordinal);
             //if (DEBUG) System.out.println("\nBTTW.addField seg=" + segment + " field=" + field.name);
-            Debug.Assert(currentField == null || currentField.Name.CompareTo(field.Name) < 0);
+            Debug.Assert(currentField == null || currentField.Name.CompareToOrdinal(field.Name) < 0);
             currentField = field;
             return new TermsWriter(this, field);
         }
@@ -1122,7 +1122,7 @@ namespace Lucene.Net.Codecs
                 //if (DEBUG) System.out.println("\nBTTW.startTerm term=" + fieldInfo.name + ":" + toString(text) + " seg=" + segment);
                 outerInstance.postingsWriter.StartTerm();
                 /*
-                if (fieldInfo.name.equals("id")) {
+                if (fieldInfo.name.Equals("id", StringComparison.Ordinal)) {
                   postingsWriter.termID = Integer.parseInt(text.utf8ToString());
                 } else {
                   postingsWriter.termID = -1;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Codecs/CodecUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/CodecUtil.cs b/src/Lucene.Net.Core/Codecs/CodecUtil.cs
index 8c565e8..b794529 100644
--- a/src/Lucene.Net.Core/Codecs/CodecUtil.cs
+++ b/src/Lucene.Net.Core/Codecs/CodecUtil.cs
@@ -141,7 +141,7 @@ namespace Lucene.Net.Codecs
         public static int CheckHeaderNoMagic(DataInput @in, string codec, int minVersion, int maxVersion)
         {
             string actualCodec = @in.ReadString();
-            if (!actualCodec.Equals(codec))
+            if (!actualCodec.Equals(codec, StringComparison.Ordinal))
             {
                 throw new System.IO.IOException("codec mismatch: actual codec=" + actualCodec + " vs expected codec=" + codec + " (resource: " + @in + ")");
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xFields.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xFields.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xFields.cs
index 329c64d..c10113a 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xFields.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xFields.cs
@@ -947,7 +947,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                     if (t2 == null || t2.Field != internedFieldName)
                     {
                         // PreFlex codec interns field names; verify:
-                        Debug.Assert(t2 == null || !t2.Field.Equals(internedFieldName));
+                        Debug.Assert(t2 == null || !t2.Field.Equals(internedFieldName, StringComparison.Ordinal));
                         current = null;
                         return SeekStatus.END;
                     }
@@ -1030,7 +1030,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                     if (t == null || t.Field != internedFieldName)
                     {
                         // PreFlex codec interns field names; verify:
-                        Debug.Assert(t == null || !t.Field.Equals(internedFieldName));
+                        Debug.Assert(t == null || !t.Field.Equals(internedFieldName, StringComparison.Ordinal));
                         current = null;
                     }
                     else
@@ -1055,7 +1055,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                     if (t == null || t.Field != internedFieldName)
                     {
                         // PreFlex codec interns field names; verify:
-                        Debug.Assert(t == null || !t.Field.Equals(internedFieldName));
+                        Debug.Assert(t == null || !t.Field.Equals(internedFieldName, StringComparison.Ordinal));
                         return null;
                     }
                     else

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSegmentInfoReader.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSegmentInfoReader.cs
index 09db0fc..7af8784 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSegmentInfoReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSegmentInfoReader.cs
@@ -87,7 +87,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                     // need to open FieldsReader every time for each such segment.
                     si.Version = "3.0";
                 }
-                else if (si.Version.Equals("2.x"))
+                else if (si.Version.Equals("2.x", StringComparison.Ordinal))
                 {
                     // If it's a 3x index touched by 3.1+ code, then segments record their
                     // version, whether they are 2.x ones or not. We detect that and throw

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Codecs/Lucene3x/TermBuffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/TermBuffer.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/TermBuffer.cs
index 79744f2..d414e67 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/TermBuffer.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/TermBuffer.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
@@ -55,7 +56,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             }
             else
             {
-                return field.CompareTo(other.field);
+                return field.CompareToOrdinal(other.field);
             }
         }
 
@@ -90,7 +91,10 @@ namespace Lucene.Net.Codecs.Lucene3x
             }
             else
             {
-                Debug.Assert(field.Equals(fieldInfos.FieldInfo(fieldNumber).Name), "currentFieldNumber=" + currentFieldNumber + " field=" + field + " vs " + fieldInfos.FieldInfo(fieldNumber) == null ? "null" : fieldInfos.FieldInfo(fieldNumber).Name);
+                Debug.Assert(field.Equals(fieldInfos.FieldInfo(fieldNumber).Name, StringComparison.Ordinal), 
+                    "currentFieldNumber=" + currentFieldNumber + 
+                    " field=" + field + 
+                    " vs " + fieldInfos.FieldInfo(fieldNumber) == null ? "null" : fieldInfos.FieldInfo(fieldNumber).Name);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReader.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReader.cs
index 5b4bd36..1e2c5f5 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReader.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
@@ -209,13 +210,13 @@ namespace Lucene.Net.Codecs.Lucene3x
 
         private int CompareAsUTF16(Term term1, Term term2)
         {
-            if (term1.Field.Equals(term2.Field))
+            if (term1.Field.Equals(term2.Field, StringComparison.Ordinal))
             {
                 return legacyComparer.Compare(term1.Bytes, term2.Bytes);
             }
             else
             {
-                return term1.Field.CompareTo(term2.Field);
+                return term1.Field.CompareToOrdinal(term2.Field);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReaderIndex.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReaderIndex.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReaderIndex.cs
index 7ed2ded..14f3744 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReaderIndex.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReaderIndex.cs
@@ -81,7 +81,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             for (int i = 0; indexEnum.Next(); i++)
             {
                 Term term = indexEnum.Term();
-                if (currentField == null || !currentField.Equals(term.Field))
+                if (currentField == null || !currentField.Equals(term.Field, StringComparison.Ordinal))
                 {
                     currentField = term.Field;
                     fieldStrs.Add(currentField);
@@ -272,7 +272,7 @@ namespace Lucene.Net.Codecs.Lucene3x
         private int CompareField(Term term, int termIndex, PagedBytesDataInput input)
         {
             input.SetPosition(indexToDataOffset.Get(termIndex));
-            return System.String.Compare(term.Field, fields[input.ReadVInt32()].Field, System.StringComparison.Ordinal);
+            return term.Field.CompareToOrdinal(fields[input.ReadVInt32()].Field);
         }
 
         internal virtual long RamBytesUsed()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
index d528a2c..9766f83 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
@@ -107,7 +108,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         public override void StartField(FieldInfo info, int numTerms, bool positions, bool offsets, bool payloads)
         {
-            Debug.Assert(lastFieldName == null || info.Name.CompareTo(lastFieldName) > 0, "fieldName=" + info.Name + " lastFieldName=" + lastFieldName);
+            Debug.Assert(lastFieldName == null || info.Name.CompareToOrdinal(lastFieldName) > 0, "fieldName=" + info.Name + " lastFieldName=" + lastFieldName);
             lastFieldName = info.Name;
             this.positions = positions;
             this.offsets = offsets;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs b/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
index e23b0ed..dd195c3 100644
--- a/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
@@ -279,7 +280,7 @@ namespace Lucene.Net.Codecs
                 fieldCount++;
                 FieldInfo fieldInfo = mergeState.FieldInfos.FieldInfo(fieldName);
 
-                Debug.Assert(lastFieldName == null || fieldName.CompareTo(lastFieldName) > 0, "lastFieldName=" + lastFieldName + " fieldName=" + fieldName);
+                Debug.Assert(lastFieldName == null || fieldName.CompareToOrdinal(lastFieldName) > 0, "lastFieldName=" + lastFieldName + " fieldName=" + fieldName);
                 lastFieldName = fieldName;
 
                 Terms terms = vectors.GetTerms(fieldName);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs b/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs
index 23decbc..5517a7d 100644
--- a/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs
+++ b/src/Lucene.Net.Core/Index/BufferedUpdatesStream.cs
@@ -479,7 +479,7 @@ namespace Lucene.Net.Index
                     // forwards
                     if (!string.Equals(term.Field, currentField, StringComparison.Ordinal))
                     {
-                        Debug.Assert(currentField == null || currentField.CompareTo(term.Field) < 0);
+                        Debug.Assert(currentField == null || currentField.CompareToOrdinal(term.Field) < 0);
                         currentField = term.Field;
                         Terms terms = fields.GetTerms(currentField);
                         if (terms != null)
@@ -584,7 +584,7 @@ namespace Lucene.Net.Index
                     if (!string.Equals(term.Field, currentField, StringComparison.Ordinal))
                     {
                         // if we change the code to process updates in terms order, enable this assert
-                        //        assert currentField == null || currentField.compareTo(term.field()) < 0;
+                        //        assert currentField == null || currentField.CompareToOrdinal(term.Field) < 0;
                         currentField = term.Field;
                         Terms terms = fields.GetTerms(currentField);
                         if (terms != null)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/CheckIndex.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/CheckIndex.cs b/src/Lucene.Net.Core/Index/CheckIndex.cs
index 4261d32..430de6f 100644
--- a/src/Lucene.Net.Core/Index/CheckIndex.cs
+++ b/src/Lucene.Net.Core/Index/CheckIndex.cs
@@ -642,7 +642,7 @@ namespace Lucene.Net.Index
             }
             else
             {
-                versionString = oldest.Equals(newest) ? ("version=" + oldest) : ("versions=[" + oldest + " .. " + newest + "]");
+                versionString = oldest.Equals(newest, StringComparison.Ordinal) ? ("version=" + oldest) : ("versions=[" + oldest + " .. " + newest + "]");
             }
 
             Msg(infoStream, "Segments file=" + segmentsFileName + " numSegments=" + numSegments + " " + versionString + " format=" + sFormat + userDataString);
@@ -2412,19 +2412,19 @@ namespace Lucene.Net.Index
           while (i < args.Length)
           {
             string arg = args[i];
-            if ("-fix".Equals(arg))
+            if ("-fix".Equals(arg, StringComparison.Ordinal))
             {
               doFix = true;
             }
-            else if ("-crossCheckTermVectors".Equals(arg))
+            else if ("-crossCheckTermVectors".Equals(arg, StringComparison.Ordinal))
             {
               doCrossCheckTermVectors = true;
             }
-            else if (arg.Equals("-verbose"))
+            else if (arg.Equals("-verbose", StringComparison.Ordinal))
             {
               verbose = true;
             }
-            else if (arg.Equals("-segment"))
+            else if (arg.Equals("-segment", StringComparison.Ordinal))
             {
               if (i == args.Length - 1)
               {
@@ -2434,7 +2434,7 @@ namespace Lucene.Net.Index
               i++;
               onlySegments.Add(args[i]);
             }
-            else if ("-dir-impl".Equals(arg))
+            else if ("-dir-impl".Equals(arg, StringComparison.Ordinal))
             {
               if (i == args.Length - 1)
               {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/DirectoryReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DirectoryReader.cs b/src/Lucene.Net.Core/Index/DirectoryReader.cs
index 8101485..bd42aa4 100644
--- a/src/Lucene.Net.Core/Index/DirectoryReader.cs
+++ b/src/Lucene.Net.Core/Index/DirectoryReader.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
@@ -289,7 +290,7 @@ namespace Lucene.Net.Index
             {
                 string fileName = files[i];
 
-                if (fileName.StartsWith(IndexFileNames.SEGMENTS) && !fileName.Equals(IndexFileNames.SEGMENTS_GEN) && SegmentInfos.GenerationFromSegmentsFileName(fileName) < currentGen)
+                if (fileName.StartsWith(IndexFileNames.SEGMENTS, StringComparison.Ordinal) && !fileName.Equals(IndexFileNames.SEGMENTS_GEN, StringComparison.Ordinal) && SegmentInfos.GenerationFromSegmentsFileName(fileName) < currentGen)
                 {
                     SegmentInfos sis = new SegmentInfos();
                     try
@@ -364,7 +365,7 @@ namespace Lucene.Net.Index
                 string prefix = IndexFileNames.SEGMENTS + "_";
                 foreach (string file in files)
                 {
-                    if (file.StartsWith(prefix) || file.Equals(IndexFileNames.SEGMENTS_GEN))
+                    if (file.StartsWith(prefix, StringComparison.Ordinal) || file.Equals(IndexFileNames.SEGMENTS_GEN, StringComparison.Ordinal))
                     {
                         return true;
                     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/DocFieldProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocFieldProcessor.cs b/src/Lucene.Net.Core/Index/DocFieldProcessor.cs
index ba0a393..98e48dc 100644
--- a/src/Lucene.Net.Core/Index/DocFieldProcessor.cs
+++ b/src/Lucene.Net.Core/Index/DocFieldProcessor.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
@@ -212,7 +213,7 @@ namespace Lucene.Net.Index
                 // Make sure we have a PerField allocated
                 int hashPos = fieldName.GetHashCode() & hashMask;
                 DocFieldProcessorPerField fp = fieldHash[hashPos];
-                while (fp != null && !fp.fieldInfo.Name.Equals(fieldName))
+                while (fp != null && !fp.fieldInfo.Name.Equals(fieldName, StringComparison.Ordinal))
                 {
                     fp = fp.next;
                 }
@@ -289,7 +290,7 @@ namespace Lucene.Net.Index
 
             public virtual int Compare(DocFieldProcessorPerField o1, DocFieldProcessorPerField o2)
             {
-                return o1.fieldInfo.Name.CompareTo(o2.fieldInfo.Name);
+                return o1.fieldInfo.Name.CompareToOrdinal(o2.fieldInfo.Name);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/FieldInfos.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/FieldInfos.cs b/src/Lucene.Net.Core/Index/FieldInfos.cs
index bf3a7fa..6881fc6 100644
--- a/src/Lucene.Net.Core/Index/FieldInfos.cs
+++ b/src/Lucene.Net.Core/Index/FieldInfos.cs
@@ -280,15 +280,17 @@ namespace Lucene.Net.Index
             {
                 lock (this)
                 {
-                    string NumberToNameStr;
-                    int? NameToNumberVal;
-                    DocValuesType? DocValuesType_E;
+                    string numberToNameStr;
+                    int? nameToNumberVal;
+                    DocValuesType? docValuesType_E;
 
-                    numberToName.TryGetValue(number, out NumberToNameStr);
-                    nameToNumber.TryGetValue(name, out NameToNumberVal);
-                    docValuesType.TryGetValue(name, out DocValuesType_E);
+                    numberToName.TryGetValue(number, out numberToNameStr);
+                    nameToNumber.TryGetValue(name, out nameToNumberVal);
+                    docValuesType.TryGetValue(name, out docValuesType_E);
 
-                    return name.Equals(NumberToNameStr) && number.Equals(nameToNumber[name]) && (dvType == null || DocValuesType_E == null || dvType == DocValuesType_E);
+                    return name.Equals(numberToNameStr, StringComparison.Ordinal) 
+                        && number.Equals(nameToNumber[name]) && 
+                        (dvType == null || docValuesType_E == null || dvType == docValuesType_E);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/FreqProxTermsWriterPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/FreqProxTermsWriterPerField.cs b/src/Lucene.Net.Core/Index/FreqProxTermsWriterPerField.cs
index 78e0748..44f5e2e 100644
--- a/src/Lucene.Net.Core/Index/FreqProxTermsWriterPerField.cs
+++ b/src/Lucene.Net.Core/Index/FreqProxTermsWriterPerField.cs
@@ -91,7 +91,7 @@ namespace Lucene.Net.Index
 
         public int CompareTo(FreqProxTermsWriterPerField other)
         {
-            return fieldInfo.Name.CompareTo(other.fieldInfo.Name);
+            return fieldInfo.Name.CompareToOrdinal(other.fieldInfo.Name);
         }
 
         // Called after flush

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/IndexFileDeleter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexFileDeleter.cs b/src/Lucene.Net.Core/Index/IndexFileDeleter.cs
index 215d6e1..b431b55 100644
--- a/src/Lucene.Net.Core/Index/IndexFileDeleter.cs
+++ b/src/Lucene.Net.Core/Index/IndexFileDeleter.cs
@@ -160,13 +160,13 @@ namespace Lucene.Net.Index
                 Regex r = IndexFileNames.CODEC_FILE_PATTERN;
                 foreach (string fileName in files)
                 {
-                    if (!fileName.EndsWith("write.lock") && !fileName.Equals(IndexFileNames.SEGMENTS_GEN)
-                        && (r.IsMatch(fileName) || fileName.StartsWith(IndexFileNames.SEGMENTS)))
+                    if (!fileName.EndsWith("write.lock", StringComparison.Ordinal) && !fileName.Equals(IndexFileNames.SEGMENTS_GEN, StringComparison.Ordinal)
+                        && (r.IsMatch(fileName) || fileName.StartsWith(IndexFileNames.SEGMENTS, StringComparison.Ordinal)))
                     {
                         // Add this file to refCounts with initial count 0:
                         GetRefCount(fileName);
 
-                        if (fileName.StartsWith(IndexFileNames.SEGMENTS))
+                        if (fileName.StartsWith(IndexFileNames.SEGMENTS, StringComparison.Ordinal))
                         {
                             // this is a commit (segments or segments_N), and
                             // it's valid (<= the max gen).  Load it, then
@@ -397,9 +397,9 @@ namespace Lucene.Net.Index
             {
                 string fileName = files[i];
                 //m.reset(fileName);
-                if ((segmentName == null || fileName.StartsWith(segmentPrefix1) || fileName.StartsWith(segmentPrefix2))
-                    && !fileName.EndsWith("write.lock") && !refCounts.ContainsKey(fileName) && !fileName.Equals(IndexFileNames.SEGMENTS_GEN)
-                    && (r.IsMatch(fileName) || fileName.StartsWith(IndexFileNames.SEGMENTS)))
+                if ((segmentName == null || fileName.StartsWith(segmentPrefix1, StringComparison.Ordinal) || fileName.StartsWith(segmentPrefix2, StringComparison.Ordinal))
+                    && !fileName.EndsWith("write.lock", StringComparison.Ordinal) && !refCounts.ContainsKey(fileName) && !fileName.Equals(IndexFileNames.SEGMENTS_GEN, StringComparison.Ordinal)
+                    && (r.IsMatch(fileName) || fileName.StartsWith(IndexFileNames.SEGMENTS, StringComparison.Ordinal)))
                 {
                     // Unreferenced file, so remove it
                     if (infoStream.IsEnabled("IFD"))

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/IndexUpgrader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexUpgrader.cs b/src/Lucene.Net.Core/Index/IndexUpgrader.cs
index a3493aa..1ad8e13 100644
--- a/src/Lucene.Net.Core/Index/IndexUpgrader.cs
+++ b/src/Lucene.Net.Core/Index/IndexUpgrader.cs
@@ -84,15 +84,15 @@ namespace Lucene.Net.Index
             while (i < args.Length)
             {
                 string arg = args[i];
-                if ("-delete-prior-commits".Equals(arg))
+                if ("-delete-prior-commits".Equals(arg, StringComparison.Ordinal))
                 {
                     deletePriorCommits = true;
                 }
-                else if ("-verbose".Equals(arg))
+                else if ("-verbose".Equals(arg, StringComparison.Ordinal))
                 {
                     @out = Console.Out;
                 }
-                else if ("-dir-impl".Equals(arg))
+                else if ("-dir-impl".Equals(arg, StringComparison.Ordinal))
                 {
                     if (i == args.Length - 1)
                     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/LiveIndexWriterConfig.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/LiveIndexWriterConfig.cs b/src/Lucene.Net.Core/Index/LiveIndexWriterConfig.cs
index d8f714b..d626810 100644
--- a/src/Lucene.Net.Core/Index/LiveIndexWriterConfig.cs
+++ b/src/Lucene.Net.Core/Index/LiveIndexWriterConfig.cs
@@ -252,7 +252,7 @@ namespace Lucene.Net.Index
         /// 
         ///     public override PostingsFormat GetPostingsFormatForField(string field)
         ///     {
-        ///         if (field.Equals("fieldWithTonsOfTerms"))
+        ///         if (field.Equals("fieldWithTonsOfTerms", StringComparison.Ordinal))
         ///             return tweakedPostings;
         ///         else
         ///             return base.GetPostingsFormatForField(field);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/NormsConsumerPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/NormsConsumerPerField.cs b/src/Lucene.Net.Core/Index/NormsConsumerPerField.cs
index 38e092d..332ebce 100644
--- a/src/Lucene.Net.Core/Index/NormsConsumerPerField.cs
+++ b/src/Lucene.Net.Core/Index/NormsConsumerPerField.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using System;
 
 namespace Lucene.Net.Index
@@ -40,7 +41,7 @@ namespace Lucene.Net.Index
 
         public int CompareTo(NormsConsumerPerField other)
         {
-            return fieldInfo.Name.CompareTo(other.fieldInfo.Name);
+            return fieldInfo.Name.CompareToOrdinal(other.fieldInfo.Name);
         }
 
         internal override void Finish()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/PersistentSnapshotDeletionPolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/PersistentSnapshotDeletionPolicy.cs b/src/Lucene.Net.Core/Index/PersistentSnapshotDeletionPolicy.cs
index 2b21a4c..5cfa29c 100644
--- a/src/Lucene.Net.Core/Index/PersistentSnapshotDeletionPolicy.cs
+++ b/src/Lucene.Net.Core/Index/PersistentSnapshotDeletionPolicy.cs
@@ -364,7 +364,7 @@ namespace Lucene.Net.Index
                         string curFileName = SNAPSHOTS_PREFIX + genLoaded;
                         foreach (string file in snapshotFiles)
                         {
-                            if (!curFileName.Equals(file))
+                            if (!curFileName.Equals(file, StringComparison.Ordinal))
                             {
                                 dir.DeleteFile(file);
                             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs b/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
index b2be2a6..79785ef 100644
--- a/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
+++ b/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
@@ -160,7 +160,7 @@ namespace Lucene.Net.Index
                 {
                     int prefix = SharedPrefix(lastTerm.Bytes, term.Bytes);
                     int suffix = term.Bytes.Length - prefix;
-                    if (term.Field.Equals(lastTerm.Field))
+                    if (term.Field.Equals(lastTerm.Field, StringComparison.Ordinal))
                     {
                         output.WriteVInt32(prefix << 1);
                     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/SegmentInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/SegmentInfo.cs b/src/Lucene.Net.Core/Index/SegmentInfo.cs
index 8a72c49..9d7c445 100644
--- a/src/Lucene.Net.Core/Index/SegmentInfo.cs
+++ b/src/Lucene.Net.Core/Index/SegmentInfo.cs
@@ -248,7 +248,7 @@ namespace Lucene.Net.Index
             if (obj is SegmentInfo)
             {
                 SegmentInfo other = (SegmentInfo)obj;
-                return other.Dir == Dir && other.Name.Equals(Name);
+                return other.Dir == Dir && other.Name.Equals(Name, StringComparison.Ordinal);
             }
             else
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/SegmentInfos.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/SegmentInfos.cs b/src/Lucene.Net.Core/Index/SegmentInfos.cs
index 4bc23e5..7d6b4ad 100644
--- a/src/Lucene.Net.Core/Index/SegmentInfos.cs
+++ b/src/Lucene.Net.Core/Index/SegmentInfos.cs
@@ -191,7 +191,7 @@ namespace Lucene.Net.Index
             long max = -1;
             foreach (var file in files)
             {
-                if (file.StartsWith(IndexFileNames.SEGMENTS) && !file.Equals(IndexFileNames.SEGMENTS_GEN))
+                if (file.StartsWith(IndexFileNames.SEGMENTS, StringComparison.Ordinal) && !file.Equals(IndexFileNames.SEGMENTS_GEN, StringComparison.Ordinal))
                 {
                     long gen = GenerationFromSegmentsFileName(file);
                     if (gen > max)
@@ -255,11 +255,11 @@ namespace Lucene.Net.Index
         /// </summary>
         public static long GenerationFromSegmentsFileName(string fileName)
         {
-            if (fileName.Equals(IndexFileNames.SEGMENTS))
+            if (fileName.Equals(IndexFileNames.SEGMENTS, StringComparison.Ordinal))
             {
                 return 0;
             }
-            else if (fileName.StartsWith(IndexFileNames.SEGMENTS))
+            else if (fileName.StartsWith(IndexFileNames.SEGMENTS, StringComparison.Ordinal))
             {
                 return Number.Parse(fileName.Substring(1 + IndexFileNames.SEGMENTS.Length), Character.MAX_RADIX);
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/StandardDirectoryReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/StandardDirectoryReader.cs b/src/Lucene.Net.Core/Index/StandardDirectoryReader.cs
index 47a66e3..1064473 100644
--- a/src/Lucene.Net.Core/Index/StandardDirectoryReader.cs
+++ b/src/Lucene.Net.Core/Index/StandardDirectoryReader.cs
@@ -390,7 +390,7 @@ namespace Lucene.Net.Index
                 {
                     throw new System.IO.IOException("the specified commit does not match the specified Directory");
                 }
-                if (segmentInfos != null && commit.SegmentsFileName.Equals(segmentInfos.GetSegmentsFileName()))
+                if (segmentInfos != null && commit.SegmentsFileName.Equals(segmentInfos.GetSegmentsFileName(), StringComparison.Ordinal))
                 {
                     return null;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/Term.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/Term.cs b/src/Lucene.Net.Core/Index/Term.cs
index 26e5b35..298fd68 100644
--- a/src/Lucene.Net.Core/Index/Term.cs
+++ b/src/Lucene.Net.Core/Index/Term.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using System;
 
 namespace Lucene.Net.Index
@@ -131,7 +132,7 @@ namespace Lucene.Net.Index
         /// </summary>
         public int CompareTo(Term other)
         {
-            int compare = string.Compare(Field, other.Field, StringComparison.Ordinal);
+            int compare = Field.CompareToOrdinal(other.Field);
             if (compare == 0)
             {
                 return Bytes.CompareTo(other.Bytes);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/TermVectorsConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/TermVectorsConsumer.cs b/src/Lucene.Net.Core/Index/TermVectorsConsumer.cs
index 308a7c2..9f03a5b 100644
--- a/src/Lucene.Net.Core/Index/TermVectorsConsumer.cs
+++ b/src/Lucene.Net.Core/Index/TermVectorsConsumer.cs
@@ -195,7 +195,7 @@ namespace Lucene.Net.Index
         {
             try
             {
-                return lastVectorFieldName != null ? lastVectorFieldName.CompareTo(fi.Name) < 0 : true;
+                return lastVectorFieldName != null ? lastVectorFieldName.CompareToOrdinal(fi.Name) < 0 : true;
             }
             finally
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/TieredMergePolicy.cs b/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
index b1995af..b13ecaa 100644
--- a/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
+++ b/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
@@ -286,7 +286,7 @@ namespace Lucene.Net.Index
                     }
                     else
                     {
-                        return o1.Info.Name.CompareTo(o2.Info.Name);
+                        return o1.Info.Name.CompareToOrdinal(o2.Info.Name);
                     }
                 }
                 catch (System.IO.IOException ioe)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Index/UpgradeIndexMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/UpgradeIndexMergePolicy.cs b/src/Lucene.Net.Core/Index/UpgradeIndexMergePolicy.cs
index b41cdbc..9e02b0c 100644
--- a/src/Lucene.Net.Core/Index/UpgradeIndexMergePolicy.cs
+++ b/src/Lucene.Net.Core/Index/UpgradeIndexMergePolicy.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Index
@@ -67,7 +68,7 @@ namespace Lucene.Net.Index
         /// </summary>
         protected virtual bool ShouldUpgradeSegment(SegmentCommitInfo si)
         {
-            return !Constants.LUCENE_MAIN_VERSION.Equals(si.Info.Version);
+            return !Constants.LUCENE_MAIN_VERSION.Equals(si.Info.Version, StringComparison.Ordinal);
         }
 
         public override void SetIndexWriter(IndexWriter writer)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/AutomatonQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/AutomatonQuery.cs b/src/Lucene.Net.Core/Search/AutomatonQuery.cs
index bb893a7..4145eaf 100644
--- a/src/Lucene.Net.Core/Search/AutomatonQuery.cs
+++ b/src/Lucene.Net.Core/Search/AutomatonQuery.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Text;
 
 namespace Lucene.Net.Search
@@ -122,7 +123,7 @@ namespace Lucene.Net.Search
         public override string ToString(string field)
         {
             StringBuilder buffer = new StringBuilder();
-            if (!m_term.Field.Equals(field))
+            if (!m_term.Field.Equals(field, StringComparison.Ordinal))
             {
                 buffer.Append(m_term.Field);
                 buffer.Append(":");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/DocTermOrdsRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/DocTermOrdsRangeFilter.cs b/src/Lucene.Net.Core/Search/DocTermOrdsRangeFilter.cs
index 004cc17..e610a0e 100644
--- a/src/Lucene.Net.Core/Search/DocTermOrdsRangeFilter.cs
+++ b/src/Lucene.Net.Core/Search/DocTermOrdsRangeFilter.cs
@@ -188,7 +188,7 @@ namespace Lucene.Net.Search
             }
             DocTermOrdsRangeFilter other = (DocTermOrdsRangeFilter)o;
 
-            if (!this.field.Equals(other.field) || this.includeLower != other.includeLower || this.includeUpper != other.includeUpper)
+            if (!this.field.Equals(other.field, StringComparison.Ordinal) || this.includeLower != other.includeLower || this.includeUpper != other.includeUpper)
             {
                 return false;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FieldCacheImpl.cs b/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
index 0f7373b..a66143d 100644
--- a/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
+++ b/src/Lucene.Net.Core/Search/FieldCacheImpl.cs
@@ -353,7 +353,7 @@ namespace Lucene.Net.Search
                 if (o is CacheKey)
                 {
                     CacheKey other = (CacheKey)o;
-                    if (other.field.Equals(field))
+                    if (other.field.Equals(field, StringComparison.Ordinal))
                     {
                         if (other.custom == null)
                         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/FieldCacheRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FieldCacheRangeFilter.cs b/src/Lucene.Net.Core/Search/FieldCacheRangeFilter.cs
index e7e2f24..3595526 100644
--- a/src/Lucene.Net.Core/Search/FieldCacheRangeFilter.cs
+++ b/src/Lucene.Net.Core/Search/FieldCacheRangeFilter.cs
@@ -1713,7 +1713,7 @@ namespace Lucene.Net.Search
             }
             FieldCacheRangeFilter<T> other = (FieldCacheRangeFilter<T>)o;
 
-            if (!this.field.Equals(other.field) || this.includeLower != other.includeLower || this.includeUpper != other.includeUpper)
+            if (!this.field.Equals(other.field, StringComparison.Ordinal) || this.includeLower != other.includeLower || this.includeUpper != other.includeUpper)
             {
                 return false;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/FieldValueFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FieldValueFilter.cs b/src/Lucene.Net.Core/Search/FieldValueFilter.cs
index fbd9803..ce5e90b 100644
--- a/src/Lucene.Net.Core/Search/FieldValueFilter.cs
+++ b/src/Lucene.Net.Core/Search/FieldValueFilter.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Index;
+using System;
 
 namespace Lucene.Net.Search
 {
@@ -171,7 +172,7 @@ namespace Lucene.Net.Search
                     return false;
                 }
             }
-            else if (!field.Equals(other.field))
+            else if (!field.Equals(other.field, StringComparison.Ordinal))
             {
                 return false;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/FuzzyQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/FuzzyQuery.cs b/src/Lucene.Net.Core/Search/FuzzyQuery.cs
index bb39c56..ea12ddc 100644
--- a/src/Lucene.Net.Core/Search/FuzzyQuery.cs
+++ b/src/Lucene.Net.Core/Search/FuzzyQuery.cs
@@ -187,7 +187,7 @@ namespace Lucene.Net.Search
         public override string ToString(string field)
         {
             var buffer = new StringBuilder();
-            if (!term.Field.Equals(field))
+            if (!term.Field.Equals(field, StringComparison.Ordinal))
             {
                 buffer.Append(term.Field);
                 buffer.Append(":");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/MultiPhraseQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/MultiPhraseQuery.cs b/src/Lucene.Net.Core/Search/MultiPhraseQuery.cs
index e7c0a8c..9d44378 100644
--- a/src/Lucene.Net.Core/Search/MultiPhraseQuery.cs
+++ b/src/Lucene.Net.Core/Search/MultiPhraseQuery.cs
@@ -116,7 +116,7 @@ namespace Lucene.Net.Search
 
             for (var i = 0; i < terms.Length; i++)
             {
-                if (!terms[i].Field.Equals(field))
+                if (!terms[i].Field.Equals(field, StringComparison.Ordinal))
                 {
                     throw new System.ArgumentException("All phrase terms must be in the same field (" + field + "): " + terms[i]);
                 }
@@ -369,7 +369,7 @@ namespace Lucene.Net.Search
         public override sealed string ToString(string f)
         {
             StringBuilder buffer = new StringBuilder();
-            if (field == null || !field.Equals(f))
+            if (field == null || !field.Equals(f, StringComparison.Ordinal))
             {
                 buffer.Append(field);
                 buffer.Append(":");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/MultiTermQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/MultiTermQuery.cs b/src/Lucene.Net.Core/Search/MultiTermQuery.cs
index 2fac386..26a5b58 100644
--- a/src/Lucene.Net.Core/Search/MultiTermQuery.cs
+++ b/src/Lucene.Net.Core/Search/MultiTermQuery.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System;
 
 namespace Lucene.Net.Search
 {
@@ -401,7 +402,7 @@ namespace Lucene.Net.Search
             {
                 return false;
             }
-            return (other.m_field == null ? m_field == null : other.m_field.Equals(m_field));
+            return (other.m_field == null ? m_field == null : other.m_field.Equals(m_field, StringComparison.Ordinal));
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/NumericRangeQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/NumericRangeQuery.cs b/src/Lucene.Net.Core/Search/NumericRangeQuery.cs
index 684f07d..add3770 100644
--- a/src/Lucene.Net.Core/Search/NumericRangeQuery.cs
+++ b/src/Lucene.Net.Core/Search/NumericRangeQuery.cs
@@ -239,7 +239,7 @@ namespace Lucene.Net.Search
         public override string ToString(string field)
         {
             StringBuilder sb = new StringBuilder();
-            if (!Field.Equals(field))
+            if (!Field.Equals(field, StringComparison.Ordinal))
             {
                 sb.Append(Field).Append(':');
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/Payloads/PayloadNearQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Payloads/PayloadNearQuery.cs b/src/Lucene.Net.Core/Search/Payloads/PayloadNearQuery.cs
index d1cda3b..81b4ea6 100644
--- a/src/Lucene.Net.Core/Search/Payloads/PayloadNearQuery.cs
+++ b/src/Lucene.Net.Core/Search/Payloads/PayloadNearQuery.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -139,7 +140,7 @@ namespace Lucene.Net.Search.Payloads
                     return false;
                 }
             }
-            else if (!m_fieldName.Equals(other.m_fieldName))
+            else if (!m_fieldName.Equals(other.m_fieldName, StringComparison.Ordinal))
             {
                 return false;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/PhraseQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/PhraseQuery.cs b/src/Lucene.Net.Core/Search/PhraseQuery.cs
index 9a702a9..9686b6a4 100644
--- a/src/Lucene.Net.Core/Search/PhraseQuery.cs
+++ b/src/Lucene.Net.Core/Search/PhraseQuery.cs
@@ -122,7 +122,7 @@ namespace Lucene.Net.Search
             {
                 field = term.Field;
             }
-            else if (!term.Field.Equals(field))
+            else if (!term.Field.Equals(field, StringComparison.Ordinal))
             {
                 throw new System.ArgumentException("All phrase terms must be in the same field: " + term);
             }
@@ -440,7 +440,7 @@ namespace Lucene.Net.Search
         public override string ToString(string f)
         {
             StringBuilder buffer = new StringBuilder();
-            if (field != null && !field.Equals(f))
+            if (field != null && !field.Equals(f, StringComparison.Ordinal))
             {
                 buffer.Append(field);
                 buffer.Append(":");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/PrefixQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/PrefixQuery.cs b/src/Lucene.Net.Core/Search/PrefixQuery.cs
index 6b06894..f23ab2d 100644
--- a/src/Lucene.Net.Core/Search/PrefixQuery.cs
+++ b/src/Lucene.Net.Core/Search/PrefixQuery.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Text;
 
 namespace Lucene.Net.Search
@@ -72,7 +73,7 @@ namespace Lucene.Net.Search
         public override string ToString(string field)
         {
             StringBuilder buffer = new StringBuilder();
-            if (!Field.Equals(field))
+            if (!Field.Equals(field, StringComparison.Ordinal))
             {
                 buffer.Append(Field);
                 buffer.Append(":");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/RegexpQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/RegexpQuery.cs b/src/Lucene.Net.Core/Search/RegexpQuery.cs
index 7516676..806d90e 100644
--- a/src/Lucene.Net.Core/Search/RegexpQuery.cs
+++ b/src/Lucene.Net.Core/Search/RegexpQuery.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Util.Automaton;
+using System;
 using System.Text;
 
 namespace Lucene.Net.Search
@@ -100,7 +101,7 @@ namespace Lucene.Net.Search
         public override string ToString(string field)
         {
             StringBuilder buffer = new StringBuilder();
-            if (!m_term.Field.Equals(field))
+            if (!m_term.Field.Equals(field, StringComparison.Ordinal))
             {
                 buffer.Append(m_term.Field);
                 buffer.Append(":");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/SortField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/SortField.cs b/src/Lucene.Net.Core/Search/SortField.cs
index 46ddb35..f125249 100644
--- a/src/Lucene.Net.Core/Search/SortField.cs
+++ b/src/Lucene.Net.Core/Search/SortField.cs
@@ -407,7 +407,10 @@ namespace Lucene.Net.Search
                 return false;
             }
             SortField other = (SortField)o;
-            return (StringHelper.Equals(other.field, this.field) && other.type == this.type && other.reverse == this.reverse && (other.comparerSource == null ? this.comparerSource == null : other.comparerSource.Equals(this.comparerSource)));
+            return (StringHelper.Equals(other.field, this.field) 
+                && other.type == this.type 
+                && other.reverse == this.reverse 
+                && (other.comparerSource == null ? this.comparerSource == null : other.comparerSource.Equals(this.comparerSource)));
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/Spans/FieldMaskingSpanQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/FieldMaskingSpanQuery.cs b/src/Lucene.Net.Core/Search/Spans/FieldMaskingSpanQuery.cs
index 52d8905..145a19a 100644
--- a/src/Lucene.Net.Core/Search/Spans/FieldMaskingSpanQuery.cs
+++ b/src/Lucene.Net.Core/Search/Spans/FieldMaskingSpanQuery.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -156,7 +157,7 @@ namespace Lucene.Net.Search.Spans
                 return false;
             }
             FieldMaskingSpanQuery other = (FieldMaskingSpanQuery)o;
-            return (this.Field.Equals(other.Field) && (this.Boost == other.Boost) && this.MaskedQuery.Equals(other.MaskedQuery));
+            return (this.Field.Equals(other.Field, StringComparison.Ordinal) && (this.Boost == other.Boost) && this.MaskedQuery.Equals(other.MaskedQuery));
         }
 
         public override int GetHashCode()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/Spans/SpanNearQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/SpanNearQuery.cs b/src/Lucene.Net.Core/Search/Spans/SpanNearQuery.cs
index d6fba02..8de90aa 100644
--- a/src/Lucene.Net.Core/Search/Spans/SpanNearQuery.cs
+++ b/src/Lucene.Net.Core/Search/Spans/SpanNearQuery.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -70,7 +71,7 @@ namespace Lucene.Net.Search.Spans
                 {
                     m_field = clause.Field;
                 }
-                else if (clause.Field != null && !clause.Field.Equals(m_field))
+                else if (clause.Field != null && !clause.Field.Equals(m_field, StringComparison.Ordinal))
                 {
                     throw new System.ArgumentException("Clauses must have same field.");
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/Spans/SpanNotQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/SpanNotQuery.cs b/src/Lucene.Net.Core/Search/Spans/SpanNotQuery.cs
index 40d5afe..2e801f7 100644
--- a/src/Lucene.Net.Core/Search/Spans/SpanNotQuery.cs
+++ b/src/Lucene.Net.Core/Search/Spans/SpanNotQuery.cs
@@ -71,7 +71,7 @@ namespace Lucene.Net.Search.Spans
             this.pre = (pre >= 0) ? pre : 0;
             this.post = (post >= 0) ? post : 0;
 
-            if (include.Field != null && exclude.Field != null && !include.Field.Equals(exclude.Field))
+            if (include.Field != null && exclude.Field != null && !include.Field.Equals(exclude.Field, StringComparison.Ordinal))
             {
                 throw new System.ArgumentException("Clauses must have same field.");
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs b/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs
index 886e8ab..e2c25c5 100644
--- a/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs
+++ b/src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs
@@ -1,6 +1,6 @@
 using Lucene.Net.Support;
 using System.Collections.Generic;
-using System.Linq;
+using System;
 using System.Text;
 
 namespace Lucene.Net.Search.Spans
@@ -58,7 +58,7 @@ namespace Lucene.Net.Search.Spans
             {
                 field = clause.Field;
             }
-            else if (clause.Field != null && !clause.Field.Equals(field))
+            else if (clause.Field != null && !clause.Field.Equals(field, StringComparison.Ordinal))
             {
                 throw new System.ArgumentException("Clauses must have same field.");
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/Spans/SpanTermQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/SpanTermQuery.cs b/src/Lucene.Net.Core/Search/Spans/SpanTermQuery.cs
index f702e0f..e20e2ff 100644
--- a/src/Lucene.Net.Core/Search/Spans/SpanTermQuery.cs
+++ b/src/Lucene.Net.Core/Search/Spans/SpanTermQuery.cs
@@ -72,7 +72,7 @@ namespace Lucene.Net.Search.Spans
         public override string ToString(string field)
         {
             StringBuilder buffer = new StringBuilder();
-            if (m_term.Field.Equals(field))
+            if (m_term.Field.Equals(field, StringComparison.Ordinal))
             {
                 buffer.Append(m_term.Text());
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/TermQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/TermQuery.cs b/src/Lucene.Net.Core/Search/TermQuery.cs
index ac48fb7..43f9d38 100644
--- a/src/Lucene.Net.Core/Search/TermQuery.cs
+++ b/src/Lucene.Net.Core/Search/TermQuery.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Text;
@@ -223,7 +224,7 @@ namespace Lucene.Net.Search
         public override string ToString(string field)
         {
             StringBuilder buffer = new StringBuilder();
-            if (!term.Field.Equals(field))
+            if (!term.Field.Equals(field, StringComparison.Ordinal))
             {
                 buffer.Append(term.Field);
                 buffer.Append(":");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/TermRangeQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/TermRangeQuery.cs b/src/Lucene.Net.Core/Search/TermRangeQuery.cs
index 6d42f0b..c5d2bc5 100644
--- a/src/Lucene.Net.Core/Search/TermRangeQuery.cs
+++ b/src/Lucene.Net.Core/Search/TermRangeQuery.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Text;
 
 namespace Lucene.Net.Search
@@ -142,16 +143,16 @@ namespace Lucene.Net.Search
         public override string ToString(string field)
         {
             StringBuilder buffer = new StringBuilder();
-            if (!Field.Equals(field))
+            if (!Field.Equals(field, StringComparison.Ordinal))
             {
                 buffer.Append(Field);
                 buffer.Append(":");
             }
             buffer.Append(includeLower ? '[' : '{');
             // TODO: all these toStrings for queries should just output the bytes, it might not be UTF-8!
-            buffer.Append(lowerTerm != null ? ("*".Equals(Term.ToString(lowerTerm)) ? "\\*" : Term.ToString(lowerTerm)) : "*");
+            buffer.Append(lowerTerm != null ? ("*".Equals(Term.ToString(lowerTerm), StringComparison.Ordinal) ? "\\*" : Term.ToString(lowerTerm)) : "*");
             buffer.Append(" TO ");
-            buffer.Append(upperTerm != null ? ("*".Equals(Term.ToString(upperTerm)) ? "\\*" : Term.ToString(upperTerm)) : "*");
+            buffer.Append(upperTerm != null ? ("*".Equals(Term.ToString(upperTerm), StringComparison.Ordinal) ? "\\*" : Term.ToString(upperTerm)) : "*");
             buffer.Append(includeUpper ? ']' : '}');
             buffer.Append(ToStringUtils.Boost(Boost));
             return buffer.ToString();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Search/WildcardQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/WildcardQuery.cs b/src/Lucene.Net.Core/Search/WildcardQuery.cs
index 141f1b2..f79ddd1 100644
--- a/src/Lucene.Net.Core/Search/WildcardQuery.cs
+++ b/src/Lucene.Net.Core/Search/WildcardQuery.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Support;
+using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -123,7 +124,7 @@ namespace Lucene.Net.Search
         public override string ToString(string field)
         {
             StringBuilder buffer = new StringBuilder();
-            if (!Field.Equals(field))
+            if (!Field.Equals(field, StringComparison.Ordinal))
             {
                 buffer.Append(Field);
                 buffer.Append(":");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Store/FSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/FSDirectory.cs b/src/Lucene.Net.Core/Store/FSDirectory.cs
index 054f55e..7627eb7 100644
--- a/src/Lucene.Net.Core/Store/FSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/FSDirectory.cs
@@ -231,7 +231,7 @@ namespace Lucene.Net.Store
                     lf.LockDir = m_directory;
                     lf.LockPrefix = null;
                 }
-                else if (dir.FullName.Equals(m_directory.FullName))
+                else if (dir.FullName.Equals(m_directory.FullName, StringComparison.Ordinal))
                 {
                     lf.LockPrefix = null;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Store/NRTCachingDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/NRTCachingDirectory.cs b/src/Lucene.Net.Core/Store/NRTCachingDirectory.cs
index b345ddb..e9394d0 100644
--- a/src/Lucene.Net.Core/Store/NRTCachingDirectory.cs
+++ b/src/Lucene.Net.Core/Store/NRTCachingDirectory.cs
@@ -364,7 +364,7 @@ namespace Lucene.Net.Store
                 bytes = context.FlushInfo.EstimatedSegmentSize;
             }
 
-            return !name.Equals(IndexFileNames.SEGMENTS_GEN) && (bytes <= maxMergeSizeBytes) && (bytes + cache.SizeInBytes()) <= maxCachedBytes;
+            return !name.Equals(IndexFileNames.SEGMENTS_GEN, StringComparison.Ordinal) && (bytes <= maxMergeSizeBytes) && (bytes + cache.SizeInBytes()) <= maxCachedBytes;
         }
 
         private readonly object uncacheLock = new object();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Support/StringCharSequenceWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/StringCharSequenceWrapper.cs b/src/Lucene.Net.Core/Support/StringCharSequenceWrapper.cs
index 58a447b..662080c 100644
--- a/src/Lucene.Net.Core/Support/StringCharSequenceWrapper.cs
+++ b/src/Lucene.Net.Core/Support/StringCharSequenceWrapper.cs
@@ -1,4 +1,6 @@
-´╗┐namespace Lucene.Net.Support
+´╗┐using System;
+
+namespace Lucene.Net.Support
 {
     public class StringCharSequenceWrapper : ICharSequence
     {
@@ -41,8 +43,10 @@
         {
             if (obj == null)
                 return false;
+            if (!(obj is string))
+                return false;
 
-            return value.Equals(obj);
+            return string.Equals(value, obj as string, StringComparison.Ordinal);
         }
 
         public override string ToString()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Support/StringCharacterIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/StringCharacterIterator.cs b/src/Lucene.Net.Core/Support/StringCharacterIterator.cs
index 796c0f9..584758c 100644
--- a/src/Lucene.Net.Core/Support/StringCharacterIterator.cs
+++ b/src/Lucene.Net.Core/Support/StringCharacterIterator.cs
@@ -210,7 +210,7 @@ namespace Lucene.Net.Support
 
             if (GetHashCode() != that.GetHashCode())
                 return false;
-            if (!text.Equals(that.text))
+            if (!text.Equals(that.text, StringComparison.Ordinal))
                 return false;
             if (pos != that.pos || begin != that.begin || end != that.end)
                 return false;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Util/Automaton/BasicOperations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Automaton/BasicOperations.cs b/src/Lucene.Net.Core/Util/Automaton/BasicOperations.cs
index d82ce81..567c450 100644
--- a/src/Lucene.Net.Core/Util/Automaton/BasicOperations.cs
+++ b/src/Lucene.Net.Core/Util/Automaton/BasicOperations.cs
@@ -458,7 +458,7 @@ namespace Lucene.Net.Util.Automaton
             }
             if (a1.IsSingleton && a2.IsSingleton)
             {
-                return a1.singleton.Equals(a2.singleton);
+                return a1.singleton.Equals(a2.singleton, StringComparison.Ordinal);
             }
             else if (a1.IsSingleton)
             {
@@ -488,7 +488,7 @@ namespace Lucene.Net.Util.Automaton
             {
                 if (a2.IsSingleton)
                 {
-                    return a1.singleton.Equals(a2.singleton);
+                    return a1.singleton.Equals(a2.singleton, StringComparison.Ordinal);
                 }
                 return BasicOperations.Run(a2, a1.singleton);
             }
@@ -557,7 +557,7 @@ namespace Lucene.Net.Util.Automaton
         /// </summary>
         public static Automaton Union(Automaton a1, Automaton a2)
         {
-            if ((a1.IsSingleton && a2.IsSingleton && a1.singleton.Equals(a2.singleton)) || a1 == a2)
+            if ((a1.IsSingleton && a2.IsSingleton && a1.singleton.Equals(a2.singleton, StringComparison.Ordinal)) || a1 == a2)
             {
                 return a1.CloneIfRequired();
             }
@@ -1058,7 +1058,7 @@ namespace Lucene.Net.Util.Automaton
         {
             if (a.IsSingleton)
             {
-                return s.Equals(a.singleton);
+                return s.Equals(a.singleton, StringComparison.Ordinal);
             }
             if (a.deterministic)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Util/Constants.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Constants.cs b/src/Lucene.Net.Core/Util/Constants.cs
index f47bc8c..66e2772 100644
--- a/src/Lucene.Net.Core/Util/Constants.cs
+++ b/src/Lucene.Net.Core/Util/Constants.cs
@@ -198,7 +198,7 @@ namespace Lucene.Net.Util
         public static string MainVersionWithoutAlphaBeta()
         {
             string[] parts = MAIN_VERSION_WITHOUT_ALPHA_BETA.Split(LUCENE_MAIN_VERSION);
-            if (parts.Length == 4 && "0".Equals(parts[2]))
+            if (parts.Length == 4 && "0".Equals(parts[2], StringComparison.Ordinal))
             {
                 return parts[0] + "." + parts[1];
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs b/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
index 587e803..9d3d6f4 100644
--- a/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
+++ b/src/Lucene.Net.Core/Util/FieldCacheSanityChecker.cs
@@ -1,5 +1,6 @@
 using Lucene.Net.Search;
 using Lucene.Net.Support;
+using System;
 using System.Collections.Generic;
 using System.Diagnostics.CodeAnalysis;
 using System.Runtime.CompilerServices;
@@ -347,7 +348,7 @@ namespace Lucene.Net.Util
                 }
 
                 ReaderField other = (ReaderField)that;
-                return (this.readerKey == other.readerKey && this.FieldName.Equals(other.FieldName));
+                return (this.readerKey == other.readerKey && this.FieldName.Equals(other.FieldName, StringComparison.Ordinal));
             }
 
             public override string ToString()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Util/MergedIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/MergedIterator.cs b/src/Lucene.Net.Core/Util/MergedIterator.cs
index 2e4d915..82f7951 100644
--- a/src/Lucene.Net.Core/Util/MergedIterator.cs
+++ b/src/Lucene.Net.Core/Util/MergedIterator.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
@@ -274,7 +275,16 @@ namespace Lucene.Net.Util
 
             protected internal override bool LessThan(SubIterator<C> a, SubIterator<C> b)
             {
-                int cmp = a.Current.CompareTo(b.Current);
+                int cmp;
+                // LUCNENENET specific: For strings, we need to ensure we compare them ordinal
+                if (typeof(C).Equals(typeof(string)))
+                {
+                    cmp = (a.Current as string).CompareToOrdinal(b.Current as string);
+                }
+                else
+                {
+                    cmp = a.Current.CompareTo(b.Current);
+                }
                 if (cmp != 0)
                 {
                     return cmp < 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Util/StringHelper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/StringHelper.cs b/src/Lucene.Net.Core/Util/StringHelper.cs
index 9789dcd..b0fd150 100644
--- a/src/Lucene.Net.Core/Util/StringHelper.cs
+++ b/src/Lucene.Net.Core/Util/StringHelper.cs
@@ -134,7 +134,7 @@ namespace Lucene.Net.Util
             }
             else
             {
-                return s1.Equals(s2);
+                return s1.Equals(s2, StringComparison.Ordinal);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.Core/Util/UnicodeUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/UnicodeUtil.cs b/src/Lucene.Net.Core/Util/UnicodeUtil.cs
index 70d3500..2f9833c 100644
--- a/src/Lucene.Net.Core/Util/UnicodeUtil.cs
+++ b/src/Lucene.Net.Core/Util/UnicodeUtil.cs
@@ -331,7 +331,7 @@ namespace Lucene.Net.Util
           try {
             String s1 = new String(source, offset, length);
             String s2 = new String(result, 0, upto, StandardCharsets.UTF_8);
-            if (!s1.equals(s2)) {
+            if (!s1.equals(s2, StringComparison.Ordinal)) {
               //System.out.println("DIFF: s1 len=" + s1.length());
               //for(int i=0;i<s1.length();i++)
               //  System.out.println("    " + i + ": " + (int) s1.charAt(i));
@@ -346,7 +346,7 @@ namespace Lucene.Net.Util
 
               return false;
             }
-            return s1.equals(s2);
+            return s1.equals(s2, StringComparison.Ordinal);
           } catch (UnsupportedEncodingException uee) {
             return false;
           }
@@ -357,7 +357,7 @@ namespace Lucene.Net.Util
           try {
             String s1 = source.substring(offset, offset+length);
             String s2 = new String(result, 0, upto, StandardCharsets.UTF_8);
-            if (!s1.equals(s2)) {
+            if (!s1.equals(s2, StringComparison.Ordinal)) {
               // Allow a difference if s1 is not valid UTF-16
 
               //System.out.println("DIFF: s1 len=" + s1.length());
@@ -374,7 +374,7 @@ namespace Lucene.Net.Util
 
               return false;
             }
-            return s1.equals(s2);
+            return s1.equals(s2, StringComparison.Ordinal);
           } catch (UnsupportedEncodingException uee) {
             return false;
           }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs b/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
index c133457..3efb1ac 100644
--- a/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
@@ -655,7 +655,8 @@ namespace Lucene.Net.Analysis
             RandomIndexWriter iw = null;
             string postingsFormat = TestUtil.GetPostingsFormat("dummy");
             bool codecOk = iterations * maxWordLength < 100000
-                || !(postingsFormat.Equals("Memory") || postingsFormat.Equals("SimpleText"));
+                || !(postingsFormat.Equals("Memory", StringComparison.Ordinal) 
+                || postingsFormat.Equals("SimpleText", StringComparison.Ordinal));
             if (Rarely(random) && codecOk)
             {
                 dir = NewFSDirectory(CreateTempDir("bttc"));
@@ -1020,7 +1021,7 @@ namespace Lucene.Net.Analysis
                         {
                             // Catch & ignore MockTokenizer's
                             // anger...
-                            if ("End() called before IncrementToken() returned false!".Equals(ae.Message))
+                            if ("End() called before IncrementToken() returned false!".Equals(ae.Message, StringComparison.Ordinal))
                             {
                                 // OK
                             }
@@ -1059,7 +1060,7 @@ namespace Lucene.Net.Analysis
                         {
                             // Catch & ignore MockTokenizer's
                             // anger...
-                            if ("End() called before IncrementToken() returned false!".Equals(ae.Message))
+                            if ("End() called before IncrementToken() returned false!".Equals(ae.Message, StringComparison.Ordinal))
                             {
                                 // OK
                             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.TestFramework/Analysis/MockReaderWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Analysis/MockReaderWrapper.cs b/src/Lucene.Net.TestFramework/Analysis/MockReaderWrapper.cs
index 9c42dcf..ee9c7c5 100644
--- a/src/Lucene.Net.TestFramework/Analysis/MockReaderWrapper.cs
+++ b/src/Lucene.Net.TestFramework/Analysis/MockReaderWrapper.cs
@@ -123,7 +123,7 @@ namespace Lucene.Net.Analysis
 
         public static bool IsMyEvilException(Exception t)
         {
-            return (t != null) && "fake exception now!".Equals(t.Message);
+            return (t != null) && "fake exception now!".Equals(t.Message, StringComparison.Ordinal);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.TestFramework/Codecs/Lucene3x/PreFlexRWTermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/Lucene3x/PreFlexRWTermVectorsWriter.cs b/src/Lucene.Net.TestFramework/Codecs/Lucene3x/PreFlexRWTermVectorsWriter.cs
index db3e4c3..e1c1b4f 100644
--- a/src/Lucene.Net.TestFramework/Codecs/Lucene3x/PreFlexRWTermVectorsWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/Lucene3x/PreFlexRWTermVectorsWriter.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
@@ -83,7 +84,7 @@ namespace Lucene.Net.Codecs.Lucene3x
 
         public override void StartField(FieldInfo info, int numTerms, bool positions, bool offsets, bool payloads)
         {
-            Debug.Assert(LastFieldName == null || info.Name.CompareTo(LastFieldName) > 0, "fieldName=" + info.Name + " lastFieldName=" + LastFieldName);
+            Debug.Assert(LastFieldName == null || info.Name.CompareToOrdinal(LastFieldName) > 0, "fieldName=" + info.Name + " lastFieldName=" + LastFieldName);
             LastFieldName = info.Name;
             if (payloads)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.TestFramework/Codecs/Lucene3x/TermInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/Lucene3x/TermInfosWriter.cs b/src/Lucene.Net.TestFramework/Codecs/Lucene3x/TermInfosWriter.cs
index fd7c05d..9ce1408 100644
--- a/src/Lucene.Net.TestFramework/Codecs/Lucene3x/TermInfosWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/Lucene3x/TermInfosWriter.cs
@@ -1,9 +1,10 @@
+using Lucene.Net.Support;
+using System;
 using System.Diagnostics;
+using System.IO;
 
 namespace Lucene.Net.Codecs.Lucene3x
 {
-    using System;
-    using System.IO;
     using BytesRef = Lucene.Net.Util.BytesRef;
     using CharsRef = Lucene.Net.Util.CharsRef;
     using Directory = Lucene.Net.Store.Directory;
@@ -196,7 +197,7 @@ namespace Lucene.Net.Codecs.Lucene3x
         {
             if (LastFieldNumber != fieldNumber)
             {
-                int cmp = FieldName(FieldInfos, LastFieldNumber).CompareTo(FieldName(FieldInfos, fieldNumber));
+                int cmp = FieldName(FieldInfos, LastFieldNumber).CompareToOrdinal(FieldName(FieldInfos, fieldNumber));
                 // If there is a field named "" (empty string) then we
                 // will get 0 on this comparison, yet, it's "OK".  But
                 // it's not OK if two different field numbers map to

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.TestFramework/Codecs/Lucene40/Lucene40PostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/Lucene40/Lucene40PostingsWriter.cs b/src/Lucene.Net.TestFramework/Codecs/Lucene40/Lucene40PostingsWriter.cs
index 11e2dc0..7a565dd 100644
--- a/src/Lucene.Net.TestFramework/Codecs/Lucene40/Lucene40PostingsWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/Lucene40/Lucene40PostingsWriter.cs
@@ -183,7 +183,7 @@ namespace Lucene.Net.Codecs.Lucene40
         {
             //System.out.println("SPW: setField");
             /*
-            if (BlockTreeTermsWriter.DEBUG && fieldInfo.Name.equals("id")) {
+            if (BlockTreeTermsWriter.DEBUG && fieldInfo.Name.Equals("id", StringComparison.Ordinal)) {
               DEBUG = true;
             } else {
               DEBUG = false;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.TestFramework/Codecs/RAMOnly/RAMOnlyPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/RAMOnly/RAMOnlyPostingsFormat.cs b/src/Lucene.Net.TestFramework/Codecs/RAMOnly/RAMOnlyPostingsFormat.cs
index a5aff40..1b5dffc 100644
--- a/src/Lucene.Net.TestFramework/Codecs/RAMOnly/RAMOnlyPostingsFormat.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/RAMOnly/RAMOnlyPostingsFormat.cs
@@ -461,7 +461,7 @@ namespace Lucene.Net.Codecs.RAMOnly
                 }
                 else
                 {
-                    if (Current.CompareTo(RamField.TermToDocs.Last().Key) > 0)
+                    if (Current.CompareToOrdinal(RamField.TermToDocs.Last().Key) > 0)
                     {
                         return SeekStatus.END;
                     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
index 5e5e58c..4fddb25 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
@@ -421,7 +421,7 @@ namespace Lucene.Net.Index
             {
                 Document doc2 = ((AtomicReader)ireader.Leaves[0].Reader).Document(i);
                 long expected;
-                if (doc2.Get("id").Equals("0"))
+                if (doc2.Get("id").Equals("0", StringComparison.Ordinal))
                 {
                     expected = -10;
                 }
@@ -564,7 +564,7 @@ namespace Lucene.Net.Index
             {
                 Document doc2 = ((AtomicReader)ireader.Leaves[0].Reader).Document(i);
                 string expected;
-                if (doc2.Get("id").Equals("0"))
+                if (doc2.Get("id").Equals("0", StringComparison.Ordinal))
                 {
                     expected = "hello world 1";
                 }
@@ -726,7 +726,7 @@ namespace Lucene.Net.Index
             {
                 Document doc2 = ((AtomicReader)ireader.Leaves[0].Reader).Document(i);
                 string expected;
-                if (doc2.Get("id").Equals("0"))
+                if (doc2.Get("id").Equals("0", StringComparison.Ordinal))
                 {
                     expected = "hello world 1";
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b86fc3ba/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index 16a6bc2..7e84095 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -543,7 +543,7 @@ namespace Lucene.Net.Index
                         {
                             throw new InvalidOperationException("Could not find document " + q);
                         }
-                        if (!Convert.ToString(q).Equals(sdoc.Get("fld")))
+                        if (!Convert.ToString(q).Equals(sdoc.Get("fld"), StringComparison.Ordinal))
                         {
                             throw new InvalidOperationException("Expected " + q + ", but got " + sdoc.Get("fld"));
                         }
@@ -571,7 +571,7 @@ namespace Lucene.Net.Index
         {
             // get another codec, other than the default: so we are merging segments across different codecs
             Codec otherCodec;
-            if ("SimpleText".Equals(Codec.Default.Name))
+            if ("SimpleText".Equals(Codec.Default.Name, StringComparison.Ordinal))
             {
                 otherCodec = new Lucene46Codec();
             }


Mime
View raw message