You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/01/29 13:27:23 UTC

[01/37] lucenenet git commit: Lucene.Net.Codecs: member accessibility

Repository: lucenenet
Updated Branches:
  refs/heads/api-work 286040300 -> 96d47cec6


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
index 1df924f..140afea 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
@@ -238,7 +238,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private sealed class SimpleTextDocsEnum : DocsEnum
+        private class SimpleTextDocsEnum : DocsEnum
         {
             private readonly IndexInput _inStart;
             private readonly IndexInput _in;
@@ -256,12 +256,12 @@ namespace Lucene.Net.Codecs.SimpleText
                 _in = (IndexInput) _inStart.Clone();
             }
 
-            public bool CanReuse(IndexInput @in)
+            public virtual bool CanReuse(IndexInput @in)
             {
                 return @in == _inStart;
             }
 
-            public SimpleTextDocsEnum Reset(long fp, IBits liveDocs, bool omitTf, int docFreq)
+            public virtual SimpleTextDocsEnum Reset(long fp, IBits liveDocs, bool omitTf, int docFreq)
             {
                 _liveDocs = liveDocs;
                 _in.Seek(fp);
@@ -364,7 +364,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private sealed class SimpleTextDocsAndPositionsEnum : DocsAndPositionsEnum
+        private class SimpleTextDocsAndPositionsEnum : DocsAndPositionsEnum
         {
             private readonly IndexInput _inStart;
             private readonly IndexInput _in;
@@ -389,12 +389,12 @@ namespace Lucene.Net.Codecs.SimpleText
                 _in = (IndexInput) _inStart.Clone();
             }
 
-            public bool CanReuse(IndexInput @in)
+            public virtual bool CanReuse(IndexInput @in)
             {
                 return @in == _inStart;
             }
 
-            public SimpleTextDocsAndPositionsEnum Reset(long fp, IBits liveDocs, IndexOptions indexOptions, int docFreq)
+            public virtual SimpleTextDocsAndPositionsEnum Reset(long fp, IBits liveDocs, IndexOptions indexOptions, int docFreq)
             {
                 _liveDocs = liveDocs;
                 _nextDocStart = fp;
@@ -574,7 +574,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private sealed class SimpleTextTerms : Terms
+        private class SimpleTextTerms : Terms
         {
             private readonly SimpleTextFieldsReader _outerInstance;
 
@@ -672,14 +672,16 @@ namespace Lucene.Net.Codecs.SimpleText
             }
 
             /// <summary>Returns approximate RAM bytes used</summary>
-            public long RamBytesUsed()
+            public virtual long RamBytesUsed()
             {
                 return (_fst != null) ? _fst.SizeInBytes() : 0;
             }
 
             public override TermsEnum GetIterator(TermsEnum reuse)
             {
-                return (_fst != null && _fieldInfo.IndexOptions.HasValue) ? new SimpleTextTermsEnum(_outerInstance, _fst, _fieldInfo.IndexOptions.Value) : TermsEnum.EMPTY;
+                return (_fst != null && _fieldInfo.IndexOptions.HasValue) 
+                    ? new SimpleTextTermsEnum(_outerInstance, _fst, _fieldInfo.IndexOptions.Value) 
+                    : TermsEnum.EMPTY;
             }
 
             public override IComparer<BytesRef> Comparer
@@ -709,20 +711,20 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override bool HasFreqs
             {
-                get { return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS) >= 0; }
+                get { return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS) >= 0; } // LUCENENET TODO: Possible exception when IndexOptions is null
             }
 
             public override bool HasOffsets
             {
                 get
                 {
-                    return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
+                    return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0; // LUCENENET TODO: Possible exception when IndexOptions is null
                 }
             }
 
             public override bool HasPositions
             {
-                get { return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0; }
+                get { return _fieldInfo.IndexOptions.GetValueOrDefault().CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0; } // LUCENENET TODO: Possible exception when IndexOptions is null
             }
 
             public override bool HasPayloads
@@ -777,5 +779,4 @@ namespace Lucene.Net.Codecs.SimpleText
         {
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
index 914b29b..3edeeac 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
@@ -30,7 +30,6 @@ namespace Lucene.Net.Codecs.SimpleText
 
     internal class SimpleTextFieldsWriter : FieldsConsumer
     {
-
         private IndexOutput _output;
         private readonly BytesRef _scratch = new BytesRef(10);
 
@@ -73,23 +72,6 @@ namespace Lucene.Net.Codecs.SimpleText
             return new SimpleTextTermsWriter(this, field);
         }
 
-        public override void Dispose()
-        {
-            if (_output == null) return;
-
-            try
-            {
-                Write(END);
-                Newline();
-                SimpleTextUtil.WriteChecksum(_output, _scratch);
-            }
-            finally
-            {
-                _output.Dispose();
-                _output = null;
-            }
-        }
-
         private class SimpleTextTermsWriter : TermsConsumer
         {
             private readonly SimpleTextFieldsWriter _outerInstance;
@@ -120,7 +102,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private sealed class SimpleTextPostingsWriter : PostingsConsumer
+        private class SimpleTextPostingsWriter : PostingsConsumer
         {
             private readonly SimpleTextFieldsWriter _outerInstance;
 
@@ -165,7 +147,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 _lastStartOffset = 0;
             }
 
-            public PostingsConsumer Reset(BytesRef term)
+            public virtual PostingsConsumer Reset(BytesRef term)
             {
                 _term = term;
                 _wroteTerm = false;
@@ -209,6 +191,22 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-    }
 
+        public override void Dispose()
+        {
+            if (_output == null) return;
+
+            try
+            {
+                Write(END);
+                Newline();
+                SimpleTextUtil.WriteChecksum(_output, _scratch);
+            }
+            finally
+            {
+                _output.Dispose();
+                _output = null;
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
index 2cdbd90..9e3b829 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
@@ -49,7 +49,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextLiveDocsFormat : LiveDocsFormat
     {
-
         internal const string LIVEDOCS_EXTENSION = "liv";
 
         internal static readonly BytesRef SIZE = new BytesRef("size ");
@@ -64,7 +63,7 @@ namespace Lucene.Net.Codecs.SimpleText
         public override IMutableBits NewLiveDocs(IBits existing)
         {
             var bits = (SimpleTextBits) existing;
-            return new SimpleTextMutableBits(new BitArray(bits.BITS), bits.SIZE);
+            return new SimpleTextMutableBits(new BitArray(bits.BITS), bits.Length);
         }
 
         public override IBits ReadLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context)
@@ -114,7 +113,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private static int ParseIntAt(BytesRef bytes, int offset, CharsRef scratch)
+        private int ParseIntAt(BytesRef bytes, int offset, CharsRef scratch) // LUCENENET TODO: Rename ParseInt32At ?
         {
             UnicodeUtil.UTF8toUTF16(bytes.Bytes, bytes.Offset + offset, bytes.Length - offset, scratch);
             return ArrayUtil.ParseInt(scratch.Chars, 0, scratch.Length);
@@ -173,8 +172,8 @@ namespace Lucene.Net.Codecs.SimpleText
         // read-only
         internal class SimpleTextBits : IBits
         {
-            internal readonly BitArray BITS;
-            internal readonly int SIZE;
+            internal readonly BitArray BITS; // LUCENENET TODO: Rename camelCase
+            private readonly int SIZE; // LUCENENET TODO: Rename camelCase
 
             internal SimpleTextBits(BitArray bits, int size)
             {
@@ -182,12 +181,12 @@ namespace Lucene.Net.Codecs.SimpleText
                 SIZE = size;
             }
 
-            public bool Get(int index)
+            public virtual bool Get(int index)
             {
                 return BITS.SafeGet(index);
             }
 
-            public int Length
+            public virtual int Length
             {
                 get { return SIZE; }
             }
@@ -197,20 +196,21 @@ namespace Lucene.Net.Codecs.SimpleText
         internal class SimpleTextMutableBits : SimpleTextBits, IMutableBits
         {
 
-            internal SimpleTextMutableBits(int size) : this(new BitArray(size), size)
+            internal SimpleTextMutableBits(int size) 
+                : this(new BitArray(size), size)
             {
                 BITS.Set(0, size);
             }
 
-            internal SimpleTextMutableBits(BitArray bits, int size) : base(bits, size)
+            internal SimpleTextMutableBits(BitArray bits, int size) 
+                : base(bits, size)
             {
             }
 
-            public void Clear(int bit)
+            public virtual void Clear(int bit)
             {
                 BITS.SafeSet(bit, false);
             }
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
index 75a0ccc..f2aff9a 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
@@ -53,7 +53,8 @@ namespace Lucene.Net.Codecs.SimpleText
         /// </summary>
         public class SimpleTextNormsProducer : SimpleTextDocValuesReader
         {
-            public SimpleTextNormsProducer(SegmentReadState state) : base(state, NORMS_SEG_EXTENSION)
+            public SimpleTextNormsProducer(SegmentReadState state) 
+                : base(state, NORMS_SEG_EXTENSION)
             {
                 // All we do is change the extension from .dat -> .len;
                 // otherwise this is a normal simple doc values file:
@@ -70,7 +71,8 @@ namespace Lucene.Net.Codecs.SimpleText
         /// </summary>
         public class SimpleTextNormsConsumer : SimpleTextDocValuesWriter
         {
-            public SimpleTextNormsConsumer(SegmentWriteState state) : base(state, NORMS_SEG_EXTENSION)
+            public SimpleTextNormsConsumer(SegmentWriteState state) 
+                : base(state, NORMS_SEG_EXTENSION)
             {
                 // All we do is change the extension from .dat -> .len;
                 // otherwise this is a normal simple doc values file:

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
index 0027065..6660efc 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
@@ -35,12 +35,8 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public sealed class SimpleTextPostingsFormat : PostingsFormat
     {
-
-        /// <summary>
-        /// Extension of freq postings file </summary>
-        internal const string POSTINGS_EXTENSION = "pst";
-
-        public SimpleTextPostingsFormat() : base("SimpleText")
+        public SimpleTextPostingsFormat() 
+            : base("SimpleText")
         {
         }
 
@@ -54,10 +50,13 @@ namespace Lucene.Net.Codecs.SimpleText
             return new SimpleTextFieldsReader(state);
         }
 
+        /// <summary>
+        /// Extension of freq postings file </summary>
+        internal const string POSTINGS_EXTENSION = "pst";
+
         internal static string GetPostingsFileName(string segment, string segmentSuffix)
         {
             return IndexFileNames.SegmentFileName(segment, segmentSuffix, POSTINGS_EXTENSION);
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
index 11c4940..f24a1e3 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
@@ -18,30 +18,28 @@
 namespace Lucene.Net.Codecs.SimpleText
 {
 
-	/// <summary>
-	/// plain text segments file format.
-	/// <para>
-	/// <b><font color="red">FOR RECREATIONAL USE ONLY</font></B>
-	/// @lucene.experimental
-	/// </para>
-	/// </summary>
-	public class SimpleTextSegmentInfoFormat : SegmentInfoFormat
-	{
-	  private readonly SegmentInfoReader _reader = new SimpleTextSegmentInfoReader();
-	  private readonly SegmentInfoWriter _writer = new SimpleTextSegmentInfoWriter();
+    /// <summary>
+    /// plain text segments file format.
+    /// <para>
+    /// <b><font color="red">FOR RECREATIONAL USE ONLY</font></B>
+    /// @lucene.experimental
+    /// </para>
+    /// </summary>
+    public class SimpleTextSegmentInfoFormat : SegmentInfoFormat
+    {
+        private readonly SegmentInfoReader _reader = new SimpleTextSegmentInfoReader();
+        private readonly SegmentInfoWriter _writer = new SimpleTextSegmentInfoWriter();
 
-	  public const string SI_EXTENSION = "si";
+        public const string SI_EXTENSION = "si";
 
-	  public override SegmentInfoReader SegmentInfoReader
-	  {
-	      get { return _reader; }
-	  }
-
-	  public override SegmentInfoWriter SegmentInfoWriter
-	  {
-	      get { return _writer; }
-	  }
-
-	}
+        public override SegmentInfoReader SegmentInfoReader
+        {
+            get { return _reader; }
+        }
 
+        public override SegmentInfoWriter SegmentInfoWriter
+        {
+            get { return _writer; }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
index 35e8c1f..e42cacc 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
@@ -43,7 +43,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextSegmentInfoReader : SegmentInfoReader
     {
-
         public override SegmentInfo Read(Directory directory, string segmentName, IOContext context)
         {
             var scratch = new BytesRef();
@@ -116,7 +115,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private static string ReadString(int offset, BytesRef scratch)
+        private string ReadString(int offset, BytesRef scratch)
         {
             return Encoding.UTF8.GetString(scratch.Bytes, scratch.Offset + offset, scratch.Length - offset);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
index ca64e80..c9464a9 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
@@ -38,7 +38,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextSegmentInfoWriter : SegmentInfoWriter
     {
-
         internal static readonly BytesRef SI_VERSION = new BytesRef("    version ");
         internal static readonly BytesRef SI_DOCCOUNT = new BytesRef("    number of documents ");
         internal static readonly BytesRef SI_USECOMPOUND = new BytesRef("    uses compound file ");
@@ -50,7 +49,6 @@ namespace Lucene.Net.Codecs.SimpleText
 
         public override void Write(Directory dir, SegmentInfo si, FieldInfos fis, IOContext ioContext)
         {
-
             var segFileName = IndexFileNames.SegmentFileName(si.Name, "", SimpleTextSegmentInfoFormat.SI_EXTENSION);
             si.AddFile(segFileName);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
index ffe698f..ffb9752 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
@@ -32,7 +32,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextStoredFieldsFormat : StoredFieldsFormat
     {
-
         public override StoredFieldsReader FieldsReader(Directory directory, SegmentInfo si, FieldInfos fn,
             IOContext context)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
index f884058..0b82c9f 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
@@ -251,7 +251,7 @@ namespace Lucene.Net.Codecs.SimpleText
             SimpleTextUtil.ReadLine(_input, _scratch);
         }
 
-        private int ParseIntAt(int offset)
+        private int ParseIntAt(int offset) // LUCENENET TODO: Rename ParseInt32At
         {
             UnicodeUtil.UTF8toUTF16(_scratch.Bytes, _scratch.Offset + offset, _scratch.Length - offset, _scratchUtf16);
             return ArrayUtil.ParseInt(_scratchUtf16.Chars, 0, _scratchUtf16.Length);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
index 84217e9..1ac0b12 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
@@ -184,7 +184,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        public override sealed void Abort()
+        public override void Abort()
 	    {
 	        try
 	        {
@@ -238,5 +238,4 @@ namespace Lucene.Net.Codecs.SimpleText
             SimpleTextUtil.WriteNewline(_output);
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
index d9829ab..8de14c1 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
@@ -37,7 +37,6 @@ namespace Lucene.Net.Codecs.SimpleText
             return new SimpleTextTermVectorsReader(directory, segmentInfo, context);
         }
 
-
         public override TermVectorsWriter VectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context)
         {
             return new SimpleTextTermVectorsWriter(directory, segmentInfo.Name, context);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
index e65d971..1f901cd 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
@@ -259,7 +259,7 @@ namespace Lucene.Net.Codecs.SimpleText
             SimpleTextUtil.ReadLine(_input, _scratch);
         }
 
-        private int ParseIntAt(int offset)
+        private int ParseIntAt(int offset) // LUCENENET TODO: Rename ParseInt32At ?
         {
             UnicodeUtil.UTF8toUTF16(_scratch.Bytes, _scratch.Offset + offset, _scratch.Length - offset, _scratchUtf16);
             return ArrayUtil.ParseInt(_scratchUtf16.Chars, 0, _scratchUtf16.Length);
@@ -271,16 +271,6 @@ namespace Lucene.Net.Codecs.SimpleText
             return _scratchUtf16.ToString();
         }
 
-        public override long RamBytesUsed()
-        {
-            return 0;
-        }
-
-        public override void CheckIntegrity()
-        {
-        }
-
-
         private class SimpleTVFields : Fields
         {
             private readonly SimpleTextTermVectorsReader _outerInstance;
@@ -310,7 +300,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
         private class SimpleTVTerms : Terms
         {
-            internal readonly SortedDictionary<BytesRef, SimpleTVPostings> TERMS;
+            internal readonly SortedDictionary<BytesRef, SimpleTVPostings> TERMS; // LUCENENET TODO: Rename camelCase
             private readonly bool _hasOffsetsRenamed;
             private readonly bool _hasPositionsRenamed;
             private readonly bool _hasPayloadsRenamed;
@@ -377,11 +367,11 @@ namespace Lucene.Net.Codecs.SimpleText
 
         private class SimpleTVPostings
         {
-            internal int FREQ;
-            internal int[] POSITIONS;
-            internal int[] START_OFFSETS;
-            internal int[] END_OFFSETS;
-            internal BytesRef[] PAYLOADS;
+            internal int FREQ; // LUCENENET TODO: Rename camelCase
+            internal int[] POSITIONS; // LUCENENET TODO: Rename camelCase
+            internal int[] START_OFFSETS; // LUCENENET TODO: Rename camelCase
+            internal int[] END_OFFSETS; // LUCENENET TODO: Rename camelCase
+            internal BytesRef[] PAYLOADS; // LUCENENET TODO: Rename camelCase
         }
 
         private class SimpleTVTermsEnum : TermsEnum
@@ -481,7 +471,7 @@ namespace Lucene.Net.Codecs.SimpleText
         }
 
         // note: these two enum classes are exactly like the Default impl...
-        private sealed class SimpleTVDocsEnum : DocsEnum
+        private class SimpleTVDocsEnum : DocsEnum
         {
             private bool _didNext;
             private int _doc = -1;
@@ -514,7 +504,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 return SlowAdvance(target);
             }
 
-            public void Reset(IBits liveDocs, int freq)
+            public virtual void Reset(IBits liveDocs, int freq)
             {
                 _liveDocs = liveDocs;
                 _freqRenamed = freq;
@@ -528,7 +518,7 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private sealed class SimpleTVDocsAndPositionsEnum : DocsAndPositionsEnum
+        private class SimpleTVDocsAndPositionsEnum : DocsAndPositionsEnum
         {
             private bool _didNext;
             private int _doc = -1;
@@ -574,7 +564,7 @@ namespace Lucene.Net.Codecs.SimpleText
                 return SlowAdvance(target);
             }
 
-            public void Reset(IBits liveDocs, int[] positions, int[] startOffsets, int[] endOffsets,
+            public virtual void Reset(IBits liveDocs, int[] positions, int[] startOffsets, int[] endOffsets,
                 BytesRef[] payloads)
             {
                 _liveDocs = liveDocs;
@@ -640,5 +630,14 @@ namespace Lucene.Net.Codecs.SimpleText
                 return 1;
             }
         }
+
+        public override long RamBytesUsed()
+        {
+            return 0;
+        }
+
+        public override void CheckIntegrity()
+        {
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
index 3a61877..7b6376f 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
@@ -40,7 +40,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextTermVectorsWriter : TermVectorsWriter
     {
-
         internal static readonly BytesRef END = new BytesRef("END");
         internal static readonly BytesRef DOC = new BytesRef("doc ");
         internal static readonly BytesRef NUMFIELDS = new BytesRef("  numfields ");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
index f497156..898cce6 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
@@ -31,8 +31,8 @@ namespace Lucene.Net.Codecs.SimpleText
 
     internal class SimpleTextUtil
     {
-        public const byte NEWLINE = 10;
-        public const byte ESCAPE = 92;
+        public static readonly byte NEWLINE = 10; // LUCENENET TODO: Should this be Environment.Newline?
+        public static readonly byte ESCAPE = 92;
         internal static readonly BytesRef CHECKSUM = new BytesRef("checksum ");
 
         public static void Write(DataOutput output, string s, BytesRef scratch)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/StringHelperClass.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/StringHelperClass.cs b/src/Lucene.Net.Codecs/StringHelperClass.cs
index 0e333f3..67505f3 100644
--- a/src/Lucene.Net.Codecs/StringHelperClass.cs
+++ b/src/Lucene.Net.Codecs/StringHelperClass.cs
@@ -27,6 +27,8 @@ using System.Runtime.InteropServices;
 namespace Lucene.Net.Codecs
 {
 
+
+    // LUCENENET TODO: Remove this class
     internal static class StringHelperClass
     {
         //----------------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Core/Index/DocsAndPositionsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocsAndPositionsEnum.cs b/src/Lucene.Net.Core/Index/DocsAndPositionsEnum.cs
index 663c4c5..5f89448 100644
--- a/src/Lucene.Net.Core/Index/DocsAndPositionsEnum.cs
+++ b/src/Lucene.Net.Core/Index/DocsAndPositionsEnum.cs
@@ -72,6 +72,6 @@ namespace Lucene.Net.Index
         ///  (neither members of the returned BytesRef nor bytes
         ///  in the byte[]).
         /// </summary>
-        public abstract BytesRef Payload { get; }
+        public abstract BytesRef Payload { get; } // LUCENENET TODO: Change to GetPayload() ?
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Core/Index/Fields.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/Fields.cs b/src/Lucene.Net.Core/Index/Fields.cs
index 4d8de5d..f98fd98 100644
--- a/src/Lucene.Net.Core/Index/Fields.cs
+++ b/src/Lucene.Net.Core/Index/Fields.cs
@@ -51,7 +51,7 @@ namespace Lucene.Net.Index
         /// Get the <seealso cref="Terms"/> for this field.  this will return
         ///  null if the field does not exist.
         /// </summary>
-        public abstract Terms Terms(string field);
+        public abstract Terms Terms(string field); // LUCENENET TODO: Rename GetTerms() ?
 
         /// <summary>
         /// Gets the number of fields or -1 if the number of


[37/37] lucenenet git commit: Lucene.Net.Codecs: Commented unused variables

Posted by ni...@apache.org.
Lucene.Net.Codecs: Commented unused variables


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

Branch: refs/heads/api-work
Commit: 96d47cec61d95e14c60891d8c536d1031e8e587c
Parents: 46743cc
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 20:25:43 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 20:25:43 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs | 2 +-
 src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj                  | 1 +
 src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs          | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/96d47cec/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
index 9b8ebae..be3f35c 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
@@ -233,7 +233,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             private readonly VariableGapTermsIndexWriter outerInstance;
 
             private readonly Builder<long?> _fstBuilder;
-            private readonly PositiveIntOutputs fstOutputs;
+            //private readonly PositiveIntOutputs fstOutputs; // LUCENENET NOTE: Not used
             private readonly long _startTermsFilePointer;
 
             internal FieldInfo FieldInfo { get; private set; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/96d47cec/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
index 19e2f64..2a52e3b 100644
--- a/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
+++ b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
@@ -21,6 +21,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/96d47cec/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
index d703b23..729aa2a 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
@@ -167,7 +167,7 @@ namespace Lucene.Net.Codecs.Pulsing
             return 0;
         }
 
-        private bool DEBUG;
+        //private bool DEBUG; // LUCENENET NOTE: Not used
 
         public override void StartDoc(int docId, int termDocFreq)
         {


[03/37] lucenenet git commit: Lucene.Net.Codecs: member accessibility

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs b/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
index 2054a5e..b638e24 100644
--- a/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
+++ b/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
@@ -36,14 +36,13 @@ namespace Lucene.Net.Codecs.Bloom
     /// </summary>
     public sealed class MurmurHash2 : HashFunction
     {
-
         public static readonly MurmurHash2 INSTANCE = new MurmurHash2();
 
         private MurmurHash2()
         {
         }
 
-        public static int Hash(byte[] data, uint seed, int offset, int len)
+        public static int Hash(byte[] data, uint seed, int offset, int len) // LUCENENET TODO: Change to int
         {
             int m = 0x5bd1e995;
             int r = 24;
@@ -103,8 +102,7 @@ namespace Lucene.Net.Codecs.Bloom
 
         public override int Hash(BytesRef br)
         {
-            return Hash32((byte[])(Array)br.Bytes, br.Offset, br.Length);
+            return Hash32((byte[])(Array)br.Bytes, br.Offset, br.Length); // LUCENENET TODO: remove unnecessary cast
         }
-
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
index 0448ef4..758a413 100644
--- a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
+++ b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
@@ -33,13 +33,8 @@ namespace Lucene.Net.Codecs.DiskDV
     /// </summary>
     public sealed class DiskDocValuesFormat : DocValuesFormat
     {
-
-        public const String DATA_CODEC = "DiskDocValuesData";
-        public const String DATA_EXTENSION = "dvdd";
-        public const String META_CODEC = "DiskDocValuesMetadata";
-        public const String META_EXTENSION = "dvdm";
-
-        public DiskDocValuesFormat() : base("Disk")
+        public DiskDocValuesFormat() 
+            : base("Disk")
         {
         }
 
@@ -69,5 +64,9 @@ namespace Lucene.Net.Codecs.DiskDV
             return new DiskDocValuesProducer(state, DATA_CODEC, DATA_EXTENSION, META_CODEC, META_EXTENSION);
         }
 
+        public static readonly string DATA_CODEC = "DiskDocValuesData";
+        public static readonly string DATA_EXTENSION = "dvdd";
+        public static readonly string META_CODEC = "DiskDocValuesMetadata";
+        public static readonly string META_EXTENSION = "dvdm";
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
index 95d58ee..605cfa0 100644
--- a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
@@ -23,12 +23,11 @@ namespace Lucene.Net.Codecs.DiskDV
     using Store;
     using Util.Packed;
 
-    public class DiskDocValuesProducer : Lucene45DocValuesProducer
+    internal class DiskDocValuesProducer : Lucene45DocValuesProducer
     {
-
-        public DiskDocValuesProducer(SegmentReadState state, String dataCodec, String dataExtension, String metaCodec,
-            String metaExtension) :
-                base(state, dataCodec, dataExtension, metaCodec, metaExtension)
+        internal DiskDocValuesProducer(SegmentReadState state, string dataCodec, string dataExtension, string metaCodec,
+            string metaExtension) 
+            : base(state, dataCodec, dataExtension, metaCodec, metaExtension)
         {
         }
 
@@ -43,7 +42,7 @@ namespace Lucene.Net.Codecs.DiskDV
         protected override MonotonicBlockPackedReader GetIntervalInstance(IndexInput data, FieldInfo field,
             BinaryEntry bytes)
         {
-            throw new InvalidOperationException();
+            throw new InvalidOperationException(); // LUCENENET NOTE: This was AssertionError in Lucene
         }
 
         protected override MonotonicBlockPackedReader GetOrdIndexInstance(IndexInput data, FieldInfo field,

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs b/src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs
index cb688c2..4284b18 100644
--- a/src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs
+++ b/src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs
@@ -28,11 +28,6 @@ namespace Lucene.Net.Codecs.DiskDV
     /// </summary>
     public sealed class DiskNormsFormat : NormsFormat
     {
-        private const String DATA_CODEC = "DiskNormsData";
-        private const String DATA_EXTENSION = "dnvd";
-        private const String META_CODEC = "DiskNormsMetadata";
-        private const String META_EXTENSION = "dnvm";
-
         public override DocValuesConsumer NormsConsumer(SegmentWriteState state)
         {
             return new Lucene45DocValuesConsumer(state, DATA_CODEC, DATA_EXTENSION, META_CODEC, META_EXTENSION);
@@ -43,5 +38,9 @@ namespace Lucene.Net.Codecs.DiskDV
             return new DiskDocValuesProducer(state, DATA_CODEC, DATA_EXTENSION, META_CODEC, META_EXTENSION);
         }
 
+        private static readonly string DATA_CODEC = "DiskNormsData";
+        private static readonly string DATA_EXTENSION = "dnvd";
+        private static readonly string META_CODEC = "DiskNormsMetadata";
+        private static readonly string META_EXTENSION = "dnvm";
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/HashMapHelperClass.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/HashMapHelperClass.cs b/src/Lucene.Net.Codecs/HashMapHelperClass.cs
index 489b446..b5caf41 100644
--- a/src/Lucene.Net.Codecs/HashMapHelperClass.cs
+++ b/src/Lucene.Net.Codecs/HashMapHelperClass.cs
@@ -5,9 +5,11 @@
 //	This class is used to replace calls to some Java HashMap or Hashtable methods.
 //---------------------------------------------------------------------------------------------------------
 using System.Collections.Generic;
+
+// LUCENENET TODO: Remove this class
 internal static class HashMapHelperClass
 {
-	internal static HashSet<KeyValuePair<TKey, TValue>> SetOfKeyValuePairs<TKey, TValue>(this IDictionary<TKey, TValue> dictionary)
+	internal static HashSet<KeyValuePair<TKey, TValue>> SetOfKeyValuePairs<TKey, TValue>(this IDictionary<TKey, TValue> dictionary) 
 	{
 		HashSet<KeyValuePair<TKey, TValue>> entries = new HashSet<KeyValuePair<TKey, TValue>>();
 		foreach (KeyValuePair<TKey, TValue> keyValuePair in dictionary)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
index f4e629c..9b09d6b 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
@@ -21,11 +21,9 @@ namespace Lucene.Net.Codecs.IntBlock
      * limitations under the License.
      */
 
-    /// <summary>
-    /// Naive int block API that writes vInts.  This is
-    ///  expected to give poor performance; it's really only for
-    ///  testing the pluggability.  One should typically use pfor instead. 
-    /// </summary>
+    // Naive int block API that writes vInts.  This is
+    // expected to give poor performance; it's really only for
+    // testing the pluggability.  One should typically use pfor instead. 
 
     /// <summary>
     /// Abstract base class that reads fixed-size blocks of ints
@@ -38,9 +36,8 @@ namespace Lucene.Net.Codecs.IntBlock
     /// </summary>
     public abstract class FixedIntBlockIndexInput : IntIndexInput
     {
-
         private readonly IndexInput input;
-        protected internal readonly int blockSize;
+        protected readonly int blockSize;
 
         public FixedIntBlockIndexInput(IndexInput @in)
         {
@@ -66,7 +63,7 @@ namespace Lucene.Net.Codecs.IntBlock
             return new InputIndex(this);
         }
 
-        protected internal abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
+        protected abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
 
 
         /// <summary>
@@ -80,7 +77,7 @@ namespace Lucene.Net.Codecs.IntBlock
             void ReadBlock();
         }
 
-        private class InputReader : IntIndexInputReader
+        private class InputReader : IntIndexInputReader // LUCENENET TODO: Rename Reader
         {
             private readonly IndexInput input;
             private readonly IBlockReader blockReader;
@@ -101,7 +98,7 @@ namespace Lucene.Net.Codecs.IntBlock
                 upto = blockSize;
             }
 
-            internal void Seek(long fp, int upto)
+            internal virtual void Seek(long fp, int upto)
             {
                 Debug.Assert(upto < blockSize);
                 if (seekPending || fp != lastBlockFP)
@@ -133,7 +130,7 @@ namespace Lucene.Net.Codecs.IntBlock
             }
         }
 
-        private class InputIndex : IntIndexInputIndex
+        private class InputIndex : IntIndexInputIndex // LUCENENET TODO: Rename Index
         {
             private readonly FixedIntBlockIndexInput outerInstance;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
index b98f92d..1a3239c 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
@@ -39,12 +39,12 @@ namespace Lucene.Net.Codecs.IntBlock
     /// </summary>
     public abstract class FixedIntBlockIndexOutput : IntIndexOutput
     {
-        protected readonly IndexOutput output;
+        protected readonly IndexOutput output; // out
         private readonly int blockSize;
         protected readonly int[] buffer;
         private int upto;
 
-        protected internal FixedIntBlockIndexOutput(IndexOutput output, int fixedBlockSize)
+        protected FixedIntBlockIndexOutput(IndexOutput output, int fixedBlockSize)
         {
             blockSize = fixedBlockSize;
             this.output = output;
@@ -52,14 +52,14 @@ namespace Lucene.Net.Codecs.IntBlock
             buffer = new int[blockSize];
         }
 
-        protected internal abstract void FlushBlock();
+        protected abstract void FlushBlock();
 
         public override IntIndexOutputIndex Index()
         {
             return new OutputIndex(this);
         }
 
-        private class OutputIndex : IntIndexOutputIndex
+        private class OutputIndex : IntIndexOutputIndex // LUCENENET TODO: Rename Index
         {
             private readonly FixedIntBlockIndexOutput outerInstance;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
index f3d4b2f..6aaeb79 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
@@ -21,11 +21,9 @@ namespace Lucene.Net.Codecs.IntBlock
      * limitations under the License.
      */
 
-    /// <summary>
-    /// Naive int block API that writes vInts.  This is
-    /// expected to give poor performance; it's really only for
-    /// testing the pluggability.  One should typically use pfor instead. 
-    /// </summary>
+    // Naive int block API that writes vInts.  This is
+    // expected to give poor performance; it's really only for
+    // testing the pluggability.  One should typically use pfor instead. 
 
     // TODO: much of this can be shared code w/ the fixed case
 
@@ -40,8 +38,8 @@ namespace Lucene.Net.Codecs.IntBlock
     /// </summary>
     public abstract class VariableIntBlockIndexInput : IntIndexInput
     {
-        private readonly IndexInput input;
-        protected internal readonly int maxBlockSize;
+        private readonly IndexInput input; // in
+        protected readonly int maxBlockSize;
 
         protected internal VariableIntBlockIndexInput(IndexInput input)
         {
@@ -67,7 +65,7 @@ namespace Lucene.Net.Codecs.IntBlock
             return new InputIndex(this);
         }
 
-        protected internal abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
+        protected abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
 
         /// <summary>
         /// Interface for variable-size block decoders.
@@ -81,7 +79,7 @@ namespace Lucene.Net.Codecs.IntBlock
             void Seek(long pos);
         }
 
-        private class InputReader : IntIndexInputReader
+        private class InputReader : IntIndexInputReader // LUCENENET TODO: Rename Reader
         {
             private readonly IndexInput input;
 
@@ -102,7 +100,7 @@ namespace Lucene.Net.Codecs.IntBlock
                 this.blockReader = blockReader;
             }
 
-            internal void Seek(long fp, int upto)
+            internal virtual void Seek(long fp, int upto)
             {
                 // TODO: should we do this in real-time, not lazy?
                 pendingFP = fp;
@@ -157,7 +155,7 @@ namespace Lucene.Net.Codecs.IntBlock
             }
         }
 
-        private class InputIndex : IntIndexInputIndex
+        private class InputIndex : IntIndexInputIndex // LUCENENET TODO: Rename Index
         {
             private readonly VariableIntBlockIndexInput outerInstance;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
index 131ffcc..82688b1 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
@@ -41,7 +41,7 @@ namespace Lucene.Net.Codecs.IntBlock
     /// </summary>
     public abstract class VariableIntBlockIndexOutput : IntIndexOutput
     {
-        protected readonly IndexOutput output;
+        protected readonly IndexOutput output; // out
 
         private int upto;
         private bool hitExcDuringWrite;
@@ -55,7 +55,7 @@ namespace Lucene.Net.Codecs.IntBlock
         ///  requires lookahead=1 because on seeing the Nth value
         ///  it knows it must now encode the N-1 values before it. 
         /// </summary>
-        protected internal VariableIntBlockIndexOutput(IndexOutput output, int maxBlockSize)
+        protected VariableIntBlockIndexOutput(IndexOutput output, int maxBlockSize)
         {
             this.output = output;
             this.output.WriteInt(maxBlockSize);
@@ -63,16 +63,16 @@ namespace Lucene.Net.Codecs.IntBlock
 
         /// <summary>
         /// Called one value at a time.  Return the number of
-        ///  buffered input values that have been written to out. 
+        /// buffered input values that have been written to out. 
         /// </summary>
-        protected internal abstract int Add(int value);
+        protected abstract int Add(int value);
 
         public override IntIndexOutputIndex Index()
         {
             return new OutputIndex(this);
         }
 
-        private class OutputIndex : IntIndexOutputIndex
+        private class OutputIndex : IntIndexOutputIndex // LUCENENET TODO: Rename Index
         {
             private readonly VariableIntBlockIndexOutput outerInstance;
 
@@ -81,10 +81,10 @@ namespace Lucene.Net.Codecs.IntBlock
                 this.outerInstance = outerInstance;
             }
 
-            long fp;
-            int upto;
-            long lastFP;
-            int lastUpto;
+            private long fp;
+            private int upto;
+            private long lastFP;
+            private int lastUpto;
 
             public override void Mark()
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
index 45fccde..b19e988 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
@@ -35,8 +35,8 @@ namespace Lucene.Net.Codecs.Memory
     /// </summary>
     internal class DirectDocValuesConsumer : DocValuesConsumer
     {
-        internal IndexOutput data, meta;
-        internal readonly int maxDoc;
+        private IndexOutput data, meta;
+        private readonly int maxDoc;
 
         internal DirectDocValuesConsumer(SegmentWriteState state, string dataCodec, string dataExtension,
             string metaCodec, string metaExtension)
@@ -256,7 +256,7 @@ namespace Lucene.Net.Codecs.Memory
 
         // TODO: in some cases representing missing with minValue-1 wouldn't take up additional space and so on,
         // but this is very simple, and algorithms only check this for values of 0 anyway (doesnt slow down normal decode)
-        internal virtual void WriteMissingBitset<T1>(IEnumerable<T1> values)
+        internal virtual void WriteMissingBitset<T1>(IEnumerable<T1> values) // LUCENENET TODO: Rename generic parameter T ?
         {
             long bits = 0;
             int count = 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/DirectDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesFormat.cs
index f2cdfef..2bf48cb 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesFormat.cs
@@ -49,7 +49,6 @@ namespace Lucene.Net.Codecs.Memory
     /// </summary>
     public class DirectDocValuesFormat : DocValuesFormat
     {
-
         /// <summary>
         /// The sum of all byte lengths for binary field, or for
         ///  the unique values in sorted or sorted set fields, cannot
@@ -63,14 +62,10 @@ namespace Lucene.Net.Codecs.Memory
         /// </summary>
         public static readonly int MAX_SORTED_SET_ORDS = ArrayUtil.MAX_ARRAY_LENGTH;
 
-        internal const string DATA_CODEC = "DirectDocValuesData";
-        internal const string DATA_EXTENSION = "dvdd";
-        internal const string METADATA_CODEC = "DirectDocValuesMetadata";
-        internal const string METADATA_EXTENSION = "dvdm";
-
         /// <summary>
         /// Sole constructor. </summary>
-        public DirectDocValuesFormat() : base("Direct")
+        public DirectDocValuesFormat() 
+            : base("Direct")
         {
         }
 
@@ -83,5 +78,10 @@ namespace Lucene.Net.Codecs.Memory
         {
             return new DirectDocValuesProducer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION);
         }
+
+        internal static readonly string DATA_CODEC = "DirectDocValuesData";
+        internal static readonly string DATA_EXTENSION = "dvdd";
+        internal static readonly string METADATA_CODEC = "DirectDocValuesMetadata";
+        internal static readonly string METADATA_EXTENSION = "dvdm";
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
index 1605cfd..49ec998 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
@@ -118,7 +118,7 @@ namespace Lucene.Net.Codecs.Memory
             }
         }
 
-        private static NumericEntry ReadNumericEntry(IndexInput meta)
+        private NumericEntry ReadNumericEntry(IndexInput meta)
         {
             var entry = new NumericEntry { offset = meta.ReadLong(), count = meta.ReadInt(), missingOffset = meta.ReadLong() };
             if (entry.missingOffset != -1)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
index 5bc3aa4..df0807a 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+using Lucene.Net.Support;
 using System.Linq;
 
 namespace Lucene.Net.Codecs.Memory
@@ -73,10 +74,8 @@ namespace Lucene.Net.Codecs.Memory
     /// @lucene.experimental 
     /// </para>
     /// </summary>
-
     public sealed class DirectPostingsFormat : PostingsFormat
     {
-
         private readonly int _minSkipCount;
         private readonly int _lowFreqCutoff;
 
@@ -85,7 +84,8 @@ namespace Lucene.Net.Codecs.Memory
 
         // TODO: allow passing/wrapping arbitrary postings format?
 
-        public DirectPostingsFormat() : this(DEFAULT_MIN_SKIP_COUNT, DEFAULT_LOW_FREQ_CUTOFF)
+        public DirectPostingsFormat() 
+            : this(DEFAULT_MIN_SKIP_COUNT, DEFAULT_LOW_FREQ_CUTOFF)
         {
         }
 
@@ -158,7 +158,7 @@ namespace Lucene.Net.Codecs.Memory
                 get { return fields.Count; }
             }
 
-            [Obsolete]
+            [Obsolete("iterate fields and add their Count instead.")]
             public override long UniqueTermCount
             {
                 get
@@ -193,7 +193,7 @@ namespace Lucene.Net.Codecs.Memory
         {
             internal abstract class TermAndSkip
             {
-                public int[] skips;
+                public int[] skips; // LUCENENET TODO: Make property
 
                 /// <summary>
                 /// Returns the approximate number of RAM bytes used </summary>
@@ -202,10 +202,10 @@ namespace Lucene.Net.Codecs.Memory
 
             private sealed class LowFreqTerm : TermAndSkip
             {
-                public readonly int[] postings;
-                public readonly byte[] payloads;
-                public readonly int docFreq;
-                public readonly int totalTermFreq;
+                public readonly int[] postings; // LUCENENET TODO: Make property
+                public readonly byte[] payloads; // LUCENENET TODO: Make property
+                public readonly int docFreq; // LUCENENET TODO: Make property
+                public readonly int totalTermFreq; // LUCENENET TODO: Make property
 
                 public LowFreqTerm(int[] postings, byte[] payloads, int docFreq, int totalTermFreq)
                 {
@@ -225,11 +225,11 @@ namespace Lucene.Net.Codecs.Memory
             // TODO: maybe specialize into prx/no-prx/no-frq cases?
             private sealed class HighFreqTerm : TermAndSkip
             {
-                public readonly long totalTermFreq;
-                public readonly int[] docIDs;
-                public readonly int[] freqs;
-                public readonly int[][] positions;
-                public readonly byte[][][] payloads;
+                public readonly long totalTermFreq; // LUCENENET TODO: Make property
+                public readonly int[] docIDs; // LUCENENET TODO: Make property
+                public readonly int[] freqs; // LUCENENET TODO: Make property
+                public readonly int[][] positions; // LUCENENET TODO: Make property
+                public readonly byte[][][] payloads; // LUCENENET TODO: Make property
 
                 public HighFreqTerm(int[] docIDs, int[] freqs, int[][] positions, byte[][][] payloads,
                     long totalTermFreq)
@@ -719,7 +719,7 @@ namespace Lucene.Net.Codecs.Memory
                 }
             }
 
-            internal void SaveSkip(int ord, int backCount)
+            private void SaveSkip(int ord, int backCount)
             {
                 TermAndSkip term = terms[ord - backCount];
                 skipCount++;
@@ -866,7 +866,7 @@ namespace Lucene.Net.Codecs.Memory
 
                 // If non-negative, exact match; else, -ord-1, where ord
                 // is where you would insert the term.
-                internal int FindTerm(BytesRef term)
+                private int FindTerm(BytesRef term)
                 {
 
                     // Just do binary search: should be (constant factor)
@@ -1130,12 +1130,12 @@ namespace Lucene.Net.Codecs.Memory
             {
                 private readonly DirectPostingsFormat.DirectField outerInstance;
 
-                internal readonly RunAutomaton runAutomaton;
-                internal readonly CompiledAutomaton compiledAutomaton;
-                internal int termOrd;
-                internal readonly BytesRef scratch = new BytesRef();
+                private readonly RunAutomaton runAutomaton;
+                private readonly CompiledAutomaton compiledAutomaton;
+                private int termOrd;
+                private readonly BytesRef scratch = new BytesRef();
 
-                internal sealed class State
+                private sealed class State
                 {
                     private readonly DirectPostingsFormat.DirectField.DirectIntersectTermsEnum outerInstance;
 
@@ -1144,16 +1144,16 @@ namespace Lucene.Net.Codecs.Memory
                         this.outerInstance = outerInstance;
                     }
 
-                    internal int changeOrd;
-                    internal int state;
-                    internal Transition[] transitions;
-                    internal int transitionUpto;
-                    internal int transitionMax;
-                    internal int transitionMin;
+                    internal int changeOrd; // LUCENENET TODO: Make Property
+                    internal int state; // LUCENENET TODO: Make Property
+                    internal Transition[] transitions; // LUCENENET TODO: Make Property
+                    internal int transitionUpto; // LUCENENET TODO: Make Property
+                    internal int transitionMax; // LUCENENET TODO: Make Property
+                    internal int transitionMin; // LUCENENET TODO: Make Property
                 }
 
-                internal State[] states;
-                internal int stateUpto;
+                private State[] states;
+                private int stateUpto;
 
                 public DirectIntersectTermsEnum(DirectPostingsFormat.DirectField outerInstance,
                     CompiledAutomaton compiled, BytesRef startTerm)
@@ -1352,7 +1352,7 @@ namespace Lucene.Net.Codecs.Memory
                     get { return BytesRef.UTF8SortedAsUnicodeComparer; }
                 }
 
-                internal void Grow()
+                private void Grow()
                 {
                     if (states.Length == 1 + stateUpto)
                     {
@@ -1790,9 +1790,9 @@ namespace Lucene.Net.Codecs.Memory
         // Docs only:
         private sealed class LowFreqDocsEnumNoTF : DocsEnum
         {
-            internal int[] postings;
-            internal readonly IBits liveDocs;
-            internal int upto;
+            private int[] postings;
+            private readonly IBits liveDocs;
+            private int upto;
 
             public LowFreqDocsEnumNoTF(IBits liveDocs)
             {
@@ -1877,9 +1877,9 @@ namespace Lucene.Net.Codecs.Memory
         // Docs + freqs:
         private sealed class LowFreqDocsEnumNoPos : DocsEnum
         {
-            internal int[] postings;
-            internal readonly IBits liveDocs;
-            internal int upto;
+            private int[] postings;
+            private readonly IBits liveDocs;
+            private int upto;
 
             public LowFreqDocsEnumNoPos(IBits liveDocs)
             {
@@ -1963,11 +1963,11 @@ namespace Lucene.Net.Codecs.Memory
         // Docs + freqs + positions/offets:
         private sealed class LowFreqDocsEnum : DocsEnum
         {
-            internal int[] postings;
-            internal readonly IBits liveDocs;
-            internal readonly int posMult;
-            internal int upto;
-            internal int freq_Renamed;
+            private int[] postings;
+            private readonly IBits liveDocs;
+            private readonly int posMult;
+            private int upto;
+            private int freq_Renamed;
 
             public LowFreqDocsEnum(IBits liveDocs, int posMult)
             {
@@ -2065,22 +2065,22 @@ namespace Lucene.Net.Codecs.Memory
 
         private sealed class LowFreqDocsAndPositionsEnum : DocsAndPositionsEnum
         {
-            internal int[] postings;
-            internal readonly IBits liveDocs;
-            internal readonly int posMult;
-            internal readonly bool hasOffsets;
-            internal readonly bool hasPayloads;
-            internal readonly BytesRef payload = new BytesRef();
-            internal int upto;
-            internal int docID_Renamed;
-            internal int freq_Renamed;
-            internal int skipPositions;
-            internal int startOffset_Renamed;
-            internal int endOffset_Renamed;
-            internal int lastPayloadOffset;
-            internal int payloadOffset;
-            internal int payloadLength;
-            internal byte[] payloadBytes;
+            private int[] postings;
+            private readonly IBits liveDocs;
+            private readonly int posMult;
+            private readonly bool hasOffsets;
+            private readonly bool hasPayloads;
+            private readonly BytesRef payload = new BytesRef();
+            private int upto;
+            private int docID_Renamed;
+            private int freq_Renamed;
+            private int skipPositions;
+            private int startOffset_Renamed;
+            private int endOffset_Renamed;
+            private int lastPayloadOffset;
+            private int payloadOffset;
+            private int payloadLength;
+            private byte[] payloadBytes;
 
             public LowFreqDocsAndPositionsEnum(IBits liveDocs, bool hasOffsets, bool hasPayloads)
             {
@@ -2256,27 +2256,29 @@ namespace Lucene.Net.Codecs.Memory
         // Docs + freqs:
         private sealed class HighFreqDocsEnum : DocsEnum
         {
-            internal int[] docIDs;
-            internal int[] freqs;
-            internal readonly IBits liveDocs;
-            internal int upto;
-            internal int docID_Renamed = -1;
+            private int[] docIDs;
+            private int[] freqs;
+            private readonly IBits liveDocs;
+            private int upto;
+            private int docID_Renamed = -1;
 
             public HighFreqDocsEnum(IBits liveDocs)
             {
                 this.liveDocs = liveDocs;
             }
 
-            public bool canReuse(IBits liveDocs)
+            public bool canReuse(IBits liveDocs) // LUCENENET TODO: Rename CanReuse()
             {
                 return liveDocs == this.liveDocs;
             }
 
+            [WritableArray]
             public int[] DocIDs
             {
                 get { return docIDs; }
             }
 
+            [WritableArray]
             public int[] Freqs
             {
                 get { return freqs; }
@@ -2446,20 +2448,17 @@ namespace Lucene.Net.Codecs.Memory
         // TODO: specialize offsets and not
         private sealed class HighFreqDocsAndPositionsEnum : DocsAndPositionsEnum
         {
-
-            private readonly BytesRef _payload = new BytesRef();
-
-            internal int[] docIDs;
-            internal int[] freqs;
-            internal int[][] positions;
-            internal byte[][][] payloads;
-            internal readonly IBits liveDocs;
-            internal readonly bool hasOffsets;
-            internal readonly int posJump;
-            internal int upto;
-            internal int docID_Renamed = -1;
-            internal int posUpto;
-            internal int[] curPositions;
+            private int[] docIDs;
+            private int[] freqs;
+            private int[][] positions;
+            private byte[][][] payloads;
+            private readonly IBits liveDocs;
+            private readonly bool hasOffsets;
+            private readonly int posJump;
+            private int upto;
+            private int docID_Renamed = -1;
+            private int posUpto;
+            private int[] curPositions;
 
             public HighFreqDocsAndPositionsEnum(IBits liveDocs, bool hasOffsets)
             {
@@ -2468,11 +2467,13 @@ namespace Lucene.Net.Codecs.Memory
                 posJump = hasOffsets ? 3 : 1;
             }
 
+            [WritableArray]
             public int[] DocIDs
             {
                 get { return docIDs; }
             }
 
+            [WritableArray]
             public int[][] Positions
             {
                 get { return positions; }
@@ -2662,6 +2663,8 @@ namespace Lucene.Net.Codecs.Memory
                 }
             }
 
+            private readonly BytesRef _payload = new BytesRef();
+
             public override BytesRef Payload
             {
                 get
@@ -2685,7 +2688,6 @@ namespace Lucene.Net.Codecs.Memory
             {
                 return docIDs.Length;
             }
-
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/FSTOrdPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdPostingsFormat.cs
index 71b9a78..89ae246 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdPostingsFormat.cs
@@ -26,10 +26,10 @@ namespace Lucene.Net.Codecs.Memory
     /// <summary>
     /// FSTOrd term dict + Lucene41PBF
     /// </summary>
-
     public sealed class FSTOrdPostingsFormat : PostingsFormat
     {
-        public FSTOrdPostingsFormat() : base("FSTOrd41")
+        public FSTOrdPostingsFormat() 
+            : base("FSTOrd41")
         {
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/FSTOrdPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdPulsing41PostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdPulsing41PostingsFormat.cs
index 0139e35..1fa3bc4 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdPulsing41PostingsFormat.cs
@@ -34,11 +34,13 @@ namespace Lucene.Net.Codecs.Memory
         private readonly PostingsBaseFormat _wrappedPostingsBaseFormat;
         private readonly int _freqCutoff;
 
-        public FSTOrdPulsing41PostingsFormat() : this(1)
+        public FSTOrdPulsing41PostingsFormat() 
+            : this(1)
         {
         }
 
-        public FSTOrdPulsing41PostingsFormat(int freqCutoff) : base("FSTOrdPulsing41")
+        public FSTOrdPulsing41PostingsFormat(int freqCutoff) 
+            : base("FSTOrdPulsing41")
         {
             _wrappedPostingsBaseFormat = new Lucene41PostingsBaseFormat();
             _freqCutoff = freqCutoff;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
index 0f6e739..8bab5ef 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
@@ -41,10 +41,10 @@ namespace Lucene.Net.Codecs.Memory
     /// </summary>
     public class FSTOrdTermsReader : FieldsProducer
     {
-        internal const int INTERVAL = FSTOrdTermsWriter.SKIP_INTERVAL;
-        internal readonly SortedDictionary<string, TermsReader> fields = new SortedDictionary<string, TermsReader>();
-        internal readonly PostingsReaderBase postingsReader;
-        internal int version;
+        private const int INTERVAL = FSTOrdTermsWriter.SKIP_INTERVAL;
+        private readonly SortedDictionary<string, TermsReader> fields = new SortedDictionary<string, TermsReader>();
+        private readonly PostingsReaderBase postingsReader;
+        private int version;
         //static final boolean TEST = false;
 
         public FSTOrdTermsReader(SegmentReadState state, PostingsReaderBase postingsReader)
@@ -134,7 +134,7 @@ namespace Lucene.Net.Codecs.Memory
             @in.Seek(@in.ReadLong());
         }
 
-        private static void CheckFieldSummary(SegmentInfo info, IndexInput indexIn, IndexInput blockIn, TermsReader field, TermsReader previous)
+        private void CheckFieldSummary(SegmentInfo info, IndexInput indexIn, IndexInput blockIn, TermsReader field, TermsReader previous)
         {
             // #docs with field must be <= #docs
             if (field.docCount < 0 || field.docCount > info.DocCount)
@@ -195,14 +195,14 @@ namespace Lucene.Net.Codecs.Memory
             private readonly FSTOrdTermsReader outerInstance;
 
             internal readonly FieldInfo fieldInfo;
-            internal readonly long numTerms;
+            private readonly long numTerms;
             internal readonly long sumTotalTermFreq;
             internal readonly long sumDocFreq;
             internal readonly int docCount;
-            internal readonly int longsSize;
+            private readonly int longsSize;
             internal readonly FST<long?> index;
 
-            internal readonly int numSkipInfo;
+            private readonly int numSkipInfo;
             internal readonly long[] skipInfo;
             internal readonly byte[] statsBlock;
             internal readonly byte[] metaLongsBlock;
@@ -252,17 +252,17 @@ namespace Lucene.Net.Codecs.Memory
 
             public override bool HasFreqs
             {
-                get { return fieldInfo.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS) >= 0; }
+                get { return fieldInfo.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS) >= 0; } // LUCENENET TODO: Possible exception if IndexOptions is null
             }
 
             public override bool HasOffsets
             {
-                get { return fieldInfo.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0; }
+                get { return fieldInfo.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0; } // LUCENENET TODO: Possible exception if IndexOptions is null
             }
 
             public override bool HasPositions
             {
-                get { return fieldInfo.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0; }
+                get { return fieldInfo.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0; } // LUCENENET TODO: Possible exception if IndexOptions is null
             }
 
             public override bool HasPayloads
@@ -324,22 +324,22 @@ namespace Lucene.Net.Codecs.Memory
                 internal readonly BlockTermState state;
 
                 /* Datainput to load stats & metadata */
-                internal readonly ByteArrayDataInput statsReader = new ByteArrayDataInput();
-                internal readonly ByteArrayDataInput metaLongsReader = new ByteArrayDataInput();
-                internal readonly ByteArrayDataInput metaBytesReader = new ByteArrayDataInput();
+                private readonly ByteArrayDataInput statsReader = new ByteArrayDataInput();
+                private readonly ByteArrayDataInput metaLongsReader = new ByteArrayDataInput();
+                private readonly ByteArrayDataInput metaBytesReader = new ByteArrayDataInput();
 
                 /* To which block is buffered */
-                internal int statsBlockOrd;
-                internal int metaBlockOrd;
+                private int statsBlockOrd;
+                private int metaBlockOrd;
 
                 /* Current buffered metadata (long[] & byte[]) */
-                internal long[][] longs;
-                internal int[] bytesStart;
-                internal int[] bytesLength;
+                private long[][] longs;
+                private int[] bytesStart;
+                private int[] bytesLength;
 
                 /* Current buffered stats (df & ttf) */
-                internal int[] docFreq_Renamed;
-                internal long[] totalTermFreq_Renamed;
+                private int[] docFreq_Renamed;
+                private long[] totalTermFreq_Renamed;
 
                 internal BaseTermsEnum(TermsReader outerInstance)
                 {
@@ -599,33 +599,35 @@ namespace Lucene.Net.Codecs.Memory
             {
                 private readonly FSTOrdTermsReader.TermsReader outerInstance;
 
-                /* True when current term's metadata is decoded */
+                /// <summary>True when current term's metadata is decoded</summary>
                 private bool decoded;
 
-                /* True when there is pending term when calling next() */
+                /// <summary>True when there is pending term when calling Next()</summary>
                 private bool pending;
 
-                /* stack to record how current term is constructed, 
-                 * used to accumulate metadata or rewind term:
-                 *   level == term.length + 1,
-                 *         == 0 when term is null */
+                /// <summary>
+                /// stack to record how current term is constructed, 
+                /// used to accumulate metadata or rewind term:
+                ///   level == term.length + 1,
+                ///     == 0 when term is null
+                /// </summary>
                 private Frame[] stack;
                 private int level;
 
-                /* term dict fst */
+                /// <summary>term dict fst</summary>
                 private readonly FST<long?> fst;
                 private readonly FST.BytesReader fstReader;
                 private readonly Outputs<long?> fstOutputs;
 
-                /* query automaton to intersect with */
+                /// <summary>query automaton to intersect with</summary>
                 private readonly ByteRunAutomaton fsa;
 
                 private sealed class Frame
                 {
-                    /* fst stats */
+                    /// <summary>fst stats</summary>
                     internal FST.Arc<long?> arc;
 
-                    /* automaton stats */
+                    /// <summary>automaton stats</summary>
                     internal int state;
 
                     internal Frame()
@@ -954,7 +956,7 @@ namespace Lucene.Net.Codecs.Memory
             }
         }
 
-        internal static void Walk<T>(FST<T> fst)
+        private static void Walk<T>(FST<T> fst) // LUCENENET NOTE: Not referenced anywhere
         {
             var queue = new List<FST.Arc<T>>();
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/FSTOrdTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsWriter.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsWriter.cs
index c90dd32..77bf2a6 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsWriter.cs
@@ -149,11 +149,11 @@ namespace Lucene.Net.Codecs.Memory
         public const int TERMS_VERSION_CURRENT = TERMS_VERSION_CHECKSUM;
         public const int SKIP_INTERVAL = 8;
 
-        internal readonly PostingsWriterBase postingsWriter;
-        internal readonly FieldInfos fieldInfos;
+        private readonly PostingsWriterBase postingsWriter;
+        private readonly FieldInfos fieldInfos;
         private readonly IList<FieldMetaData> _fields = new List<FieldMetaData>();
-        internal IndexOutput blockOut = null;
-        internal IndexOutput indexOut = null;
+        private IndexOutput blockOut = null;
+        private IndexOutput indexOut = null;
 
         public FSTOrdTermsWriter(SegmentWriteState state, PostingsWriterBase postingsWriter)
         {
@@ -236,12 +236,12 @@ namespace Lucene.Net.Codecs.Memory
             }
         }
 
-        private static void WriteHeader(IndexOutput @out)
+        private void WriteHeader(IndexOutput @out)
         {
             CodecUtil.WriteHeader(@out, TERMS_CODEC_NAME, TERMS_VERSION_CURRENT);
         }
 
-        private static void WriteTrailer(IndexOutput output, long dirStart)
+        private void WriteTrailer(IndexOutput output, long dirStart)
         {
             output.WriteLong(dirStart);
         }
@@ -387,7 +387,7 @@ namespace Lucene.Net.Codecs.Memory
                 _outerInstance._fields.Add(metadata);
             }
 
-            internal void BufferSkip()
+            private void BufferSkip()
             {
                 _skipOut.WriteVLong(_statsOut.FilePointer - _lastBlockStatsFp);
                 _skipOut.WriteVLong(_metaLongsOut.FilePointer - _lastBlockMetaLongsFp);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/FSTPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/FSTPostingsFormat.cs
index 432fcdd..a552fe9 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTPostingsFormat.cs
@@ -27,10 +27,10 @@ namespace Lucene.Net.Codecs.Memory
     /// <summary>
     /// FST term dict + Lucene41PBF
     /// </summary>
-
     public sealed class FSTPostingsFormat : PostingsFormat
     {
-        public FSTPostingsFormat() : base("FST41")
+        public FSTPostingsFormat() 
+            : base("FST41")
         {
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/FSTPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTPulsing41PostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/FSTPulsing41PostingsFormat.cs
index 84ca223..7f285fd 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTPulsing41PostingsFormat.cs
@@ -30,17 +30,18 @@ namespace Lucene.Net.Codecs.Memory
     ///  FST does no delta encoding here!
     ///  @lucene.experimental 
     /// </summary>
-
     public class FSTPulsing41PostingsFormat : PostingsFormat
     {
         private readonly PostingsBaseFormat _wrappedPostingsBaseFormat;
         private readonly int _freqCutoff;
 
-        public FSTPulsing41PostingsFormat() : this(1)
+        public FSTPulsing41PostingsFormat() 
+            : this(1)
         {
         }
 
-        public FSTPulsing41PostingsFormat(int freqCutoff) : base("FSTPulsing41")
+        public FSTPulsing41PostingsFormat(int freqCutoff) 
+            : base("FSTPulsing41")
         {
             _wrappedPostingsBaseFormat = new Lucene41PostingsBaseFormat();
             _freqCutoff = freqCutoff;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs b/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
index 0157e85..debef54 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
@@ -50,10 +50,10 @@ namespace Lucene.Net.Codecs.Memory
         /// </summary>
         internal class TermData
         {
-            internal long[] LONGS;
-            internal byte[] BYTES;
-            internal int DOC_FREQ;
-            internal long TOTAL_TERM_FREQ;
+            internal long[] LONGS; // LUCENENET TODO: Rename longs
+            internal byte[] BYTES; // LUCENENET TODO: Rename bytes
+            internal int DOC_FREQ; // LUCENENET TODO: Rename docFreq
+            internal long TOTAL_TERM_FREQ; // LUCENENET TODO: Rename totalTermFreq
 
             internal TermData()
             {
@@ -109,7 +109,6 @@ namespace Lucene.Net.Codecs.Memory
                 var _other = (TermData) other;
                 return StatsEqual(this, _other) && LongsEqual(this, _other) && BytesEqual(this, _other);
             }
-
         }
 
         protected internal FSTTermOutputs(FieldInfo fieldInfo, int longsSize)
@@ -359,12 +358,12 @@ namespace Lucene.Net.Codecs.Memory
             return data.ToString();
         }
 
-        internal static bool StatsEqual(TermData t1, TermData t2)
+        private static bool StatsEqual(TermData t1, TermData t2)
         {
             return t1.DOC_FREQ == t2.DOC_FREQ && t1.TOTAL_TERM_FREQ == t2.TOTAL_TERM_FREQ;
         }
 
-        internal static bool BytesEqual(TermData t1, TermData t2)
+        private static bool BytesEqual(TermData t1, TermData t2)
         {
             if (t1.BYTES == null && t2.BYTES == null)
             {
@@ -373,7 +372,7 @@ namespace Lucene.Net.Codecs.Memory
             return t1.BYTES != null && t2.BYTES != null && Arrays.Equals(t1.BYTES, t2.BYTES);
         }
 
-        internal static bool LongsEqual(TermData t1, TermData t2)
+        private static bool LongsEqual(TermData t1, TermData t2)
         {
             if (t1.LONGS == null && t2.LONGS == null)
             {
@@ -382,7 +381,7 @@ namespace Lucene.Net.Codecs.Memory
             return t1.LONGS != null && t2.LONGS != null && Arrays.Equals(t1.LONGS, t2.LONGS);
         }
 
-        internal static bool AllZero(long[] l)
+        private static bool AllZero(long[] l)
         {
             return l.All(t => t == 0);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
index 691b654..7a2df34 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
@@ -55,13 +55,12 @@ namespace Lucene.Net.Codecs.Memory
     /// 
     /// @lucene.experimental
     /// </summary>
-
     public class FSTTermsReader : FieldsProducer
     {
-        internal readonly SortedDictionary<string, TermsReader> fields = new SortedDictionary<string, TermsReader>();
-        internal readonly PostingsReaderBase postingsReader;
+        private readonly SortedDictionary<string, TermsReader> fields = new SortedDictionary<string, TermsReader>();
+        private readonly PostingsReaderBase postingsReader;
         //static boolean TEST = false;
-        internal readonly int version;
+        private readonly int version;
 
         public FSTTermsReader(SegmentReadState state, PostingsReaderBase postingsReader)
         {
@@ -190,11 +189,11 @@ namespace Lucene.Net.Codecs.Memory
             private readonly FSTTermsReader outerInstance;
 
             internal readonly FieldInfo fieldInfo;
-            internal readonly long numTerms;
+            private readonly long numTerms;
             internal readonly long sumTotalTermFreq;
             internal readonly long sumDocFreq;
             internal readonly int docCount;
-            internal readonly int longsSize;
+            private readonly int longsSize;
             internal readonly FST<FSTTermOutputs.TermData> dict;
 
             internal TermsReader(FSTTermsReader outerInstance, FieldInfo fieldInfo, IndexInput @in, long numTerms, long sumTotalTermFreq, long sumDocFreq, int docCount, int longsSize)
@@ -281,13 +280,13 @@ namespace Lucene.Net.Codecs.Memory
             {
                 private readonly FSTTermsReader.TermsReader outerInstance;
 
-                /* Current term, null when enum ends or unpositioned */
+                /// <summary>Current term, null when enum ends or unpositioned</summary>
                 internal BytesRef term_Renamed;
 
-                /* Current term stats + decoded metadata (customized by PBF) */
+                /// <summary>Current term stats + decoded metadata (customized by PBF)</summary>
                 internal readonly BlockTermState state;
 
-                /* Current term stats + undecoded metadata (long[] & byte[]) */
+                /// <summary>Current term stats + undecoded metadata (long[] & byte[])</summary>
                 internal FSTTermOutputs.TermData meta;
                 internal ByteArrayDataInput bytesReader;
 
@@ -358,15 +357,16 @@ namespace Lucene.Net.Codecs.Memory
             {
                 private readonly FSTTermsReader.TermsReader outerInstance;
 
-                internal readonly BytesRefFSTEnum<FSTTermOutputs.TermData> fstEnum;
+                private readonly BytesRefFSTEnum<FSTTermOutputs.TermData> fstEnum;
 
-                /* True when current term's metadata is decoded */
-                internal bool decoded;
+                /// <summary>True when current term's metadata is decoded</summary>
+                private bool decoded;
 
-                /* True when current enum is 'positioned' by seekExact(TermState) */
-                internal bool seekPending;
+                /// <summary>True when current enum is 'positioned' by seekExact(TermState)</summary>
+                private bool seekPending;
 
-                internal SegmentTermsEnum(FSTTermsReader.TermsReader outerInstance) : base(outerInstance)
+                internal SegmentTermsEnum(FSTTermsReader.TermsReader outerInstance) 
+                    : base(outerInstance)
                 {
                     this.outerInstance = outerInstance;
                     this.fstEnum = new BytesRefFSTEnum<FSTTermOutputs.TermData>(outerInstance.dict);
@@ -462,39 +462,43 @@ namespace Lucene.Net.Codecs.Memory
             {
                 private readonly FSTTermsReader.TermsReader outerInstance;
 
-                /* True when current term's metadata is decoded */
-                internal bool decoded;
-
-                /* True when there is pending term when calling next() */
-                internal bool pending;
+                /// <summary>True when current term's metadata is decoded</summary>
+                private bool decoded;
 
-                /* stack to record how current term is constructed, 
-                 * used to accumulate metadata or rewind term:
-                 *   level == term.Length + 1,
-                 *         == 0 when term is null */
-                internal Frame[] stack;
-                internal int level;
+                /// <summary>True when there is pending term when calling Next()</summary>
+                private bool pending;
+     
+                /// <summary>
+                /// stack to record how current term is constructed,
+                /// used to accumulate metadata or rewind term:
+                ///   level == term.Length + 1,
+                ///     == 0 when term is null */
+                /// </summary>
+                private Frame[] stack;
+                private int level;
 
-                /* to which level the metadata is accumulated 
-                 * so that we can accumulate metadata lazily */
-                internal int metaUpto;
+                /// <summary>
+                /// to which level the metadata is accumulated
+                /// so that we can accumulate metadata lazily
+                /// </summary>
+                private int metaUpto;
 
-                /* term dict fst */
-                internal readonly FST<FSTTermOutputs.TermData> fst;
-                internal readonly FST.BytesReader fstReader;
-                internal readonly Outputs<FSTTermOutputs.TermData> fstOutputs;
+                /// <summary>term dict fst</summary>
+                private readonly FST<FSTTermOutputs.TermData> fst;
+                private readonly FST.BytesReader fstReader;
+                private readonly Outputs<FSTTermOutputs.TermData> fstOutputs;
 
-                /* query automaton to intersect with */
-                internal readonly ByteRunAutomaton fsa;
+                /// <summary>query automaton to intersect with</summary>
+                private readonly ByteRunAutomaton fsa;
 
                 internal sealed class Frame
                 {
                     private readonly FSTTermsReader.TermsReader.IntersectTermsEnum outerInstance;
 
-                    /* fst stats */
+                    /// <summary>fst stats</summary>
                     internal FST.Arc<FSTTermOutputs.TermData> fstArc;
 
-                    /* automaton stats */
+                    /// <summary>automaton stats</summary>
                     internal int fsaState;
 
                     internal Frame(FSTTermsReader.TermsReader.IntersectTermsEnum outerInstance)
@@ -571,8 +575,7 @@ namespace Lucene.Net.Codecs.Memory
 
                 /// <summary>
                 /// Lazily accumulate meta data, when we got a accepted term </summary>
-                //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-                //ORIGINAL LINE: void loadMetaData() throws java.io.IOException
+                /// <exception cref="System.IO.IOException"/>
                 internal void LoadMetaData()
                 {
                     FST.Arc<FSTTermOutputs.TermData> last, next;
@@ -655,7 +658,7 @@ namespace Lucene.Net.Codecs.Memory
                     return term_Renamed;
                 }
 
-                internal BytesRef DoSeekCeil(BytesRef target)
+                private BytesRef DoSeekCeil(BytesRef target)
                 {
                     //if (TEST) System.out.println("Enum doSeekCeil()");
                     Frame frame = null;
@@ -699,7 +702,7 @@ namespace Lucene.Net.Codecs.Memory
                 }
 
                 /// <summary> Virtual frame, never pop </summary>
-                internal Frame LoadVirtualFrame(Frame frame)
+                private Frame LoadVirtualFrame(Frame frame)
                 {
                     frame.fstArc.Output = fstOutputs.NoOutput;
                     frame.fstArc.NextFinalOutput = fstOutputs.NoOutput;
@@ -708,7 +711,7 @@ namespace Lucene.Net.Codecs.Memory
                 }
 
                 /// <summary> Load frame for start arc(node) on fst </summary>
-                internal Frame LoadFirstFrame(Frame frame)
+                private Frame LoadFirstFrame(Frame frame)
                 {
                     frame.fstArc = fst.GetFirstArc(frame.fstArc);
                     frame.fsaState = fsa.InitialState;
@@ -717,7 +720,7 @@ namespace Lucene.Net.Codecs.Memory
 
                 /// <summary>
                 /// Load frame for target arc(node) on fst </summary>
-                internal Frame LoadExpandFrame(Frame top, Frame frame)
+                private Frame LoadExpandFrame(Frame top, Frame frame)
                 {
                     if (!CanGrow(top))
                     {
@@ -734,7 +737,7 @@ namespace Lucene.Net.Codecs.Memory
                 }
 
                 /// <summary> Load frame for sibling arc(node) on fst </summary>
-                internal Frame LoadNextFrame(Frame top, Frame frame)
+                private Frame LoadNextFrame(Frame top, Frame frame)
                 {
                     if (!CanRewind(frame))
                     {
@@ -761,7 +764,7 @@ namespace Lucene.Net.Codecs.Memory
                 /// Load frame for target arc(node) on fst, so that 
                 ///  arc.label >= label and !fsa.reject(arc.label) 
                 /// </summary>
-                internal Frame LoadCeilFrame(int label, Frame top, Frame frame)
+                private Frame LoadCeilFrame(int label, Frame top, Frame frame)
                 {
                     FST.Arc<FSTTermOutputs.TermData> arc = frame.fstArc;
                     arc = Util.ReadCeilArc(label, fst, top.fstArc, arc, fstReader);
@@ -778,31 +781,31 @@ namespace Lucene.Net.Codecs.Memory
                     return frame;
                 }
 
-                internal bool IsAccept(Frame frame) // reach a term both fst&fsa accepts
+                private bool IsAccept(Frame frame) // reach a term both fst&fsa accepts
                 {
                     return fsa.IsAccept(frame.fsaState) && frame.fstArc.IsFinal;
                 }
-                internal bool IsValid(Frame frame) // reach a prefix both fst&fsa won't reject
+                private bool IsValid(Frame frame) // reach a prefix both fst&fsa won't reject
                 {
                     return frame.fsaState != -1; //frame != null &&
                 }
-                internal bool CanGrow(Frame frame) // can walk forward on both fst&fsa
+                private bool CanGrow(Frame frame) // can walk forward on both fst&fsa
                 {
                     return frame.fsaState != -1 && FST<Memory.FSTTermOutputs.TermData>.TargetHasArcs(frame.fstArc);
                 }
-                internal bool CanRewind(Frame frame) // can jump to sibling
+                private bool CanRewind(Frame frame) // can jump to sibling
                 {
                     return !frame.fstArc.IsLast;
                 }
 
-                internal void PushFrame(Frame frame)
+                private void PushFrame(Frame frame)
                 {
                     term_Renamed = Grow(frame.fstArc.Label);
                     level++;
                     //if (TEST) System.out.println("  term=" + term + " level=" + level);
                 }
 
-                internal Frame PopFrame()
+                private Frame PopFrame()
                 {
                     term_Renamed = Shrink();
                     level--;
@@ -811,7 +814,7 @@ namespace Lucene.Net.Codecs.Memory
                     return stack[level + 1];
                 }
 
-                internal Frame NewFrame()
+                private Frame NewFrame()
                 {
                     if (level + 1 == stack.Length)
                     {
@@ -826,12 +829,12 @@ namespace Lucene.Net.Codecs.Memory
                     return stack[level + 1];
                 }
 
-                internal Frame TopFrame()
+                private Frame TopFrame()
                 {
                     return stack[level];
                 }
 
-                internal BytesRef Grow(int label)
+                private BytesRef Grow(int label)
                 {
                     if (term_Renamed == null)
                     {
@@ -848,7 +851,7 @@ namespace Lucene.Net.Codecs.Memory
                     return term_Renamed;
                 }
 
-                internal BytesRef Shrink()
+                private BytesRef Shrink()
                 {
                     if (term_Renamed.Length == 0)
                     {
@@ -863,7 +866,7 @@ namespace Lucene.Net.Codecs.Memory
             }
         }
 
-        internal static void Walk<T>(FST<T> fst)
+        internal static void Walk<T>(FST<T> fst) // LUCENENET NOTE: Not referenced
         {
             List<FST.Arc<T>> queue = new List<FST.Arc<T>>();
             FST.BytesReader reader = fst.GetBytesReader();
@@ -912,5 +915,4 @@ namespace Lucene.Net.Codecs.Memory
             postingsReader.CheckIntegrity();
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs b/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
index b4e312e..0cc3700 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
@@ -155,7 +155,7 @@ namespace Lucene.Net.Codecs.Memory
             CodecUtil.WriteHeader(output, TERMS_CODEC_NAME, TERMS_VERSION_CURRENT);
         }
 
-        private static void WriteTrailer(IndexOutput output, long dirStart)
+        private void WriteTrailer(IndexOutput output, long dirStart)
         {
             output.WriteLong(dirStart);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
index cc6beff..dd51846 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
@@ -49,9 +49,9 @@ namespace Lucene.Net.Codecs.Memory
     /// </summary>
     internal class MemoryDocValuesConsumer : DocValuesConsumer
     {
-        internal IndexOutput data, meta;
-        internal readonly int maxDoc;
-        internal readonly float acceptableOverheadRatio;
+        private IndexOutput data, meta;
+        private readonly int maxDoc;
+        private readonly float acceptableOverheadRatio;
 
         internal MemoryDocValuesConsumer(SegmentWriteState state, string dataCodec, string dataExtension,
             string metaCodec,
@@ -432,12 +432,12 @@ namespace Lucene.Net.Codecs.Memory
         // per-document vint-encoded byte[]
         internal class SortedSetIterator : IEnumerator<BytesRef>
         {
-            internal byte[] buffer = new byte[10];
-            internal ByteArrayDataOutput @out = new ByteArrayDataOutput();
-            internal BytesRef _current = new BytesRef();
+            private byte[] buffer = new byte[10];
+            private ByteArrayDataOutput @out = new ByteArrayDataOutput();
+            private BytesRef _current = new BytesRef();
 
-            internal readonly IEnumerator<long?> counts;
-            internal readonly IEnumerator<long?> ords;
+            private readonly IEnumerator<long?> counts;
+            private readonly IEnumerator<long?> ords;
 
             public BytesRef Current
             {
@@ -485,7 +485,7 @@ namespace Lucene.Net.Codecs.Memory
             }
 
             // encodes count values to buffer
-            internal virtual void EncodeValues(int count)
+            private void EncodeValues(int count)
             {
                 @out.Reset(buffer);
                 long lastOrd = 0;
@@ -500,7 +500,6 @@ namespace Lucene.Net.Codecs.Memory
                 }
             }
 
-
             public void Dispose()
             {
                 // nothing to do

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
index 1c40d89..4ff0e52 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
@@ -25,22 +25,17 @@ namespace Lucene.Net.Codecs.Memory
     /// In-memory docvalues format </summary>
     public class MemoryDocValuesFormat : DocValuesFormat
     {
-
         /// <summary>Maximum length for each binary doc values field. </summary>
         public static readonly int MAX_BINARY_FIELD_LENGTH = (1 << 15) - 2;
 
-        internal readonly float ACCEPTABLE_OVERHEAD_RATIO;
+        internal readonly float ACCEPTABLE_OVERHEAD_RATIO; // LUCENENET TODO: Rename acceptableOverheadRatio
 
-        internal const string DATA_CODEC = "MemoryDocValuesData";
-        internal const string DATA_EXTENSION = "mdvd";
-        internal const string METADATA_CODEC = "MemoryDocValuesMetadata";
-        internal const string METADATA_EXTENSION = "mdvm";
-    
         /// <summary>
         /// Calls {@link #MemoryDocValuesFormat(float) 
         /// MemoryDocValuesFormat(PackedInts.DEFAULT)} 
         /// </summary>
-        public MemoryDocValuesFormat() : this(PackedInts.DEFAULT)
+        public MemoryDocValuesFormat() 
+            : this(PackedInts.DEFAULT)
         {
         }
 
@@ -51,7 +46,8 @@ namespace Lucene.Net.Codecs.Memory
         ///        Currently this is only used when the number of unique values is small.
         ///        
         /// @lucene.experimental </param>
-        public MemoryDocValuesFormat(float acceptableOverheadRatio) : base("Memory")
+        public MemoryDocValuesFormat(float acceptableOverheadRatio) 
+            : base("Memory")
         {
             ACCEPTABLE_OVERHEAD_RATIO = acceptableOverheadRatio;
         }
@@ -67,6 +63,9 @@ namespace Lucene.Net.Codecs.Memory
             return new MemoryDocValuesProducer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION);
         }
 
+        internal const string DATA_CODEC = "MemoryDocValuesData";
+        internal const string DATA_EXTENSION = "mdvd";
+        internal const string METADATA_CODEC = "MemoryDocValuesMetadata";
+        internal const string METADATA_EXTENSION = "mdvm";
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
index 2f9b219..272fa09 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
@@ -756,16 +756,16 @@ namespace Lucene.Net.Codecs.Memory
         // exposes FSTEnum directly as a TermsEnum: avoids binary-search next()
         internal class FSTTermsEnum : TermsEnum
         {
-            internal readonly BytesRefFSTEnum<long?> input;
+            private readonly BytesRefFSTEnum<long?> input;
 
             // this is all for the complicated seek(ord)...
             // maybe we should add a FSTEnum that supports this operation?
-            internal readonly FST<long?> fst;
-            internal readonly FST.BytesReader bytesReader;
-            internal readonly FST.Arc<long?> firstArc = new FST.Arc<long?>();
-            internal readonly FST.Arc<long?> scratchArc = new FST.Arc<long?>();
-            internal readonly IntsRef scratchInts = new IntsRef();
-            internal readonly BytesRef scratchBytes = new BytesRef();
+            private readonly FST<long?> fst;
+            private readonly FST.BytesReader bytesReader;
+            private readonly FST.Arc<long?> firstArc = new FST.Arc<long?>();
+            private readonly FST.Arc<long?> scratchArc = new FST.Arc<long?>();
+            private readonly IntsRef scratchInts = new IntsRef();
+            private readonly BytesRef scratchBytes = new BytesRef();
 
             internal FSTTermsEnum(FST<long?> fst)
             {
@@ -854,5 +854,4 @@ namespace Lucene.Net.Codecs.Memory
             }
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
index 5967d65..d2aa086 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
@@ -76,11 +76,11 @@ namespace Lucene.Net.Codecs.Memory
     // loads itself in ram?
     public sealed class MemoryPostingsFormat : PostingsFormat
     {
-
         private readonly bool doPackFST;
         private readonly float acceptableOverheadRatio;
 
-        public MemoryPostingsFormat() : this(false, PackedInts.DEFAULT)
+        public MemoryPostingsFormat() 
+            : this(false, PackedInts.DEFAULT)
         {
         }
 
@@ -90,7 +90,8 @@ namespace Lucene.Net.Codecs.Memory
         ///        NOTE: packed FSTs are limited to ~2.1 GB of postings. </param>
         /// <param name="acceptableOverheadRatio"> allowable overhead for packed ints
         ///        during FST construction. </param>
-        public MemoryPostingsFormat(bool doPackFST, float acceptableOverheadRatio) : base("Memory")
+        public MemoryPostingsFormat(bool doPackFST, float acceptableOverheadRatio) 
+            : base("Memory")
         {
             this.doPackFST = doPackFST;
             this.acceptableOverheadRatio = acceptableOverheadRatio;
@@ -103,22 +104,18 @@ namespace Lucene.Net.Codecs.Memory
 
         private sealed class TermsWriter : TermsConsumer
         {
-            internal void InitializeInstanceFields()
-            {
-                postingsWriter = new PostingsWriter(this);
-            }
-
-            internal readonly IndexOutput @out;
-            internal readonly FieldInfo field;
-            internal readonly Builder<BytesRef> builder;
-            internal readonly ByteSequenceOutputs outputs = ByteSequenceOutputs.Singleton;
-            internal readonly bool doPackFST;
-            internal readonly float acceptableOverheadRatio;
-            internal int termCount;
+            private readonly IndexOutput @out;
+            private readonly FieldInfo field;
+            private readonly Builder<BytesRef> builder;
+            private readonly ByteSequenceOutputs outputs = ByteSequenceOutputs.Singleton;
+            private readonly bool doPackFST;
+            private readonly float acceptableOverheadRatio;
+            private int termCount;
 
             public TermsWriter(IndexOutput @out, FieldInfo field, bool doPackFST, float acceptableOverheadRatio)
             {
-                InitializeInstanceFields();
+                postingsWriter = new PostingsWriter(this);
+
                 this.@out = @out;
                 this.field = field;
                 this.doPackFST = doPackFST;
@@ -135,16 +132,16 @@ namespace Lucene.Net.Codecs.Memory
                     this.outerInstance = outerInstance;
                 }
 
-                internal int lastDocID;
-                internal int lastPos;
-                internal int lastPayloadLen;
+                private int lastDocID;
+                private int lastPos;
+                private int lastPayloadLen;
 
                 // NOTE: not private so we don't pay access check at runtime:
                 internal int docCount;
                 internal RAMOutputStream buffer = new RAMOutputStream();
 
-                internal int lastOffsetLength;
-                internal int lastOffset;
+                private int lastOffsetLength;
+                private int lastOffset;
 
                 public override void StartDoc(int docID, int termDocFreq)
                 {
@@ -232,7 +229,7 @@ namespace Lucene.Net.Codecs.Memory
                 {
                 }
 
-                public virtual PostingsWriter reset()
+                public virtual PostingsWriter reset() // LUCENENET TODO: Rename Reset()
                 {
                     Debug.Assert(buffer.FilePointer == 0);
                     lastDocID = 0;
@@ -243,22 +240,21 @@ namespace Lucene.Net.Codecs.Memory
                 }
             }
 
-            private PostingsWriter postingsWriter;
+            private readonly PostingsWriter postingsWriter;
 
             public override PostingsConsumer StartTerm(BytesRef text)
             {
                 return postingsWriter.reset();
             }
 
-            internal readonly RAMOutputStream buffer2 = new RAMOutputStream();
-            internal readonly BytesRef spare = new BytesRef();
-            internal byte[] finalBuffer = new byte[128];
+            private readonly RAMOutputStream buffer2 = new RAMOutputStream();
+            private readonly BytesRef spare = new BytesRef();
+            private byte[] finalBuffer = new byte[128];
 
-            internal readonly IntsRef scratchIntsRef = new IntsRef();
+            private readonly IntsRef scratchIntsRef = new IntsRef();
 
             public override void FinishTerm(BytesRef text, TermStats stats)
             {
-
                 Debug.Assert(postingsWriter.docCount == stats.DocFreq);
 
                 Debug.Assert(buffer2.FilePointer == 0);
@@ -382,27 +378,23 @@ namespace Lucene.Net.Codecs.Memory
 
         private sealed class FSTDocsEnum : DocsEnum
         {
-            internal void InitializeInstanceFields()
-            {
-                @in = new ByteArrayDataInput(buffer);
-            }
-
-            internal readonly IndexOptions indexOptions;
-            internal readonly bool storePayloads;
-            internal byte[] buffer = new byte[16];
-            internal ByteArrayDataInput @in;
-
-            internal IBits liveDocs;
-            internal int docUpto;
-            internal int docID_Renamed = -1;
-            internal int accum;
-            internal int freq_Renamed;
-            internal int payloadLen;
-            internal int numDocs;
+            private readonly IndexOptions indexOptions;
+            private readonly bool storePayloads;
+            private byte[] buffer = new byte[16];
+            private ByteArrayDataInput @in;
+
+            private IBits liveDocs;
+            private int docUpto;
+            private int docID_Renamed = -1;
+            private int accum;
+            private int freq_Renamed;
+            private int payloadLen;
+            private int numDocs;
 
             public FSTDocsEnum(IndexOptions indexOptions, bool storePayloads)
             {
-                InitializeInstanceFields();
+                @in = new ByteArrayDataInput(buffer);
+
                 this.indexOptions = indexOptions;
                 this.storePayloads = storePayloads;
             }
@@ -539,33 +531,29 @@ namespace Lucene.Net.Codecs.Memory
 
         private sealed class FSTDocsAndPositionsEnum : DocsAndPositionsEnum
         {
-            internal void InitializeInstanceFields()
-            {
-                @in = new ByteArrayDataInput(buffer);
-            }
-
-            internal readonly bool storePayloads;
-            internal byte[] buffer = new byte[16];
-            internal ByteArrayDataInput @in;
-
-            internal IBits liveDocs;
-            internal int docUpto;
-            internal int docID_Renamed = -1;
-            internal int accum;
-            internal int freq_Renamed;
-            internal int numDocs;
-            internal int posPending;
-            internal int payloadLength;
-            internal readonly bool storeOffsets;
-            internal int offsetLength;
-            internal int startOffset_Renamed;
-
-            internal int pos;
-            internal readonly BytesRef payload = new BytesRef();
+            private readonly bool storePayloads;
+            private byte[] buffer = new byte[16];
+            private ByteArrayDataInput @in;
+
+            private IBits liveDocs;
+            private int docUpto;
+            private int docID_Renamed = -1;
+            private int accum;
+            private int freq_Renamed;
+            private int numDocs;
+            private int posPending;
+            private int payloadLength;
+            private readonly bool storeOffsets;
+            private int offsetLength;
+            private int startOffset_Renamed;
+
+            private int pos;
+            private readonly BytesRef payload = new BytesRef();
 
             public FSTDocsAndPositionsEnum(bool storePayloads, bool storeOffsets)
             {
-                InitializeInstanceFields();
+                @in = new ByteArrayDataInput(buffer);
+
                 this.storePayloads = storePayloads;
                 this.storeOffsets = storeOffsets;
             }
@@ -575,7 +563,7 @@ namespace Lucene.Net.Codecs.Memory
                 return storePayloads == this.storePayloads && storeOffsets == this.storeOffsets;
             }
 
-            public FSTDocsAndPositionsEnum reset(BytesRef bufferIn, IBits liveDocs, int numDocs)
+            public FSTDocsAndPositionsEnum reset(BytesRef bufferIn, IBits liveDocs, int numDocs) // LUCENENET TODO: Rename Reset
             {
                 Debug.Assert(numDocs > 0);
 
@@ -763,15 +751,15 @@ namespace Lucene.Net.Codecs.Memory
 
         private sealed class FSTTermsEnum : TermsEnum
         {
-            internal readonly FieldInfo field;
-            internal readonly BytesRefFSTEnum<BytesRef> fstEnum;
-            internal readonly ByteArrayDataInput buffer = new ByteArrayDataInput();
-            internal bool didDecode;
+            private readonly FieldInfo field;
+            private readonly BytesRefFSTEnum<BytesRef> fstEnum;
+            private readonly ByteArrayDataInput buffer = new ByteArrayDataInput();
+            private bool didDecode;
 
-            internal int docFreq_Renamed;
-            internal long totalTermFreq_Renamed;
-            internal BytesRefFSTEnum.InputOutput<BytesRef> current;
-            internal BytesRef postingsSpare = new BytesRef();
+            private int docFreq_Renamed;
+            private long totalTermFreq_Renamed;
+            private BytesRefFSTEnum.InputOutput<BytesRef> current;
+            private BytesRef postingsSpare = new BytesRef();
 
             public FSTTermsEnum(FieldInfo field, FST<BytesRef> fst)
             {
@@ -779,7 +767,7 @@ namespace Lucene.Net.Codecs.Memory
                 fstEnum = new BytesRefFSTEnum<BytesRef>(fst);
             }
 
-            internal void decodeMetaData() // LUCENENET TODO: Rename pascal case
+            private void decodeMetaData() // LUCENENET TODO: Rename pascal case
             {
                 if (!didDecode)
                 {
@@ -862,7 +850,6 @@ namespace Lucene.Net.Codecs.Memory
 
             public override DocsAndPositionsEnum DocsAndPositions(IBits liveDocs, DocsAndPositionsEnum reuse, int flags)
             {
-
                 bool hasOffsets = field.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
                 if (field.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) < 0)
                 {
@@ -949,13 +936,12 @@ namespace Lucene.Net.Codecs.Memory
 
         private sealed class TermsReader : Terms
         {
-
-            internal readonly long sumTotalTermFreq;
-            internal readonly long sumDocFreq;
-            internal readonly int docCount;
-            internal readonly int termCount;
+            private readonly long sumTotalTermFreq;
+            private readonly long sumDocFreq;
+            private readonly int docCount;
+            private readonly int termCount;
             internal FST<BytesRef> fst;
-            internal readonly ByteSequenceOutputs outputs = ByteSequenceOutputs.Singleton;
+            private readonly ByteSequenceOutputs outputs = ByteSequenceOutputs.Singleton;
             internal readonly FieldInfo field;
 
             public TermsReader(FieldInfos fieldInfos, IndexInput @in, int termCount)
@@ -1021,17 +1007,17 @@ namespace Lucene.Net.Codecs.Memory
 
             public override bool HasFreqs
             {
-                get { return field.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS) >= 0; }
+                get { return field.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS) >= 0; } // LUCENENET TODO: Possible exception if IndexOptions is null
             }
 
             public override bool HasOffsets
             {
-                get { return field.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0; }
+                get { return field.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0; } // LUCENENET TODO: Possible exception if IndexOptions is null
             }
 
             public override bool HasPositions
             {
-                get { return field.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0; }
+                get { return field.IndexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0; } // LUCENENET TODO: Possible exception if IndexOptions is null
             }
 
             public override bool HasPayloads
@@ -1043,7 +1029,6 @@ namespace Lucene.Net.Codecs.Memory
             {
                 return ((fst != null) ? fst.SizeInBytes() : 0);
             }
-
         }
 
         public override FieldsProducer FieldsProducer(SegmentReadState state)
@@ -1129,5 +1114,4 @@ namespace Lucene.Net.Codecs.Memory
             }
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Pulsing/Pulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/Pulsing41PostingsFormat.cs b/src/Lucene.Net.Codecs/Pulsing/Pulsing41PostingsFormat.cs
index 458771e..000c232 100644
--- a/src/Lucene.Net.Codecs/Pulsing/Pulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/Pulsing41PostingsFormat.cs
@@ -26,21 +26,21 @@ namespace Lucene.Net.Codecs.Pulsing
     /// </summary>
     public class Pulsing41PostingsFormat : PulsingPostingsFormat
     {
-
         /// <summary>Inlines docFreq=1 terms, otherwise uses the normal "Lucene41" format.</summary>
-        public Pulsing41PostingsFormat() : this(1)
+        public Pulsing41PostingsFormat() 
+            : this(1)
         {
         }
 
         /// <summary>Inlines docFreq=<code>freqCutoff</code> terms, otherwise uses the normal "Lucene41" format.</summary>
-        public Pulsing41PostingsFormat(int freqCutoff) :
-            this(freqCutoff, BlockTreeTermsWriter.DEFAULT_MIN_BLOCK_SIZE, BlockTreeTermsWriter.DEFAULT_MAX_BLOCK_SIZE)
+        public Pulsing41PostingsFormat(int freqCutoff) 
+            : this(freqCutoff, BlockTreeTermsWriter.DEFAULT_MIN_BLOCK_SIZE, BlockTreeTermsWriter.DEFAULT_MAX_BLOCK_SIZE)
         {
         }
 
         /// <summary>Inlines docFreq=<code>freqCutoff</code> terms, otherwise uses the normal "Lucene41" format.</summary>
-        public Pulsing41PostingsFormat(int freqCutoff, int minBlockSize, int maxBlockSize) :
-            base("Pulsing41", new Lucene41PostingsBaseFormat(), freqCutoff, minBlockSize, maxBlockSize)
+        public Pulsing41PostingsFormat(int freqCutoff, int minBlockSize, int maxBlockSize) 
+            : base("Pulsing41", new Lucene41PostingsBaseFormat(), freqCutoff, minBlockSize, maxBlockSize)
         {
         }
     }


[20/37] lucenenet git commit: Lucene.Net.Codecs.Memory.DirectPostingsFormat refactor: changed public field skips to public property Skips backed by private field

Posted by ni...@apache.org.
Lucene.Net.Codecs.Memory.DirectPostingsFormat refactor: changed public field skips to public property Skips backed by private field


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

Branch: refs/heads/api-work
Commit: 0d3588aa5340255eeee37a28b4073911bdff0093
Parents: 6998f2f
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 16:10:50 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:24 2017 +0700

----------------------------------------------------------------------
 .../Memory/DirectPostingsFormat.cs              | 36 ++++++++++++--------
 1 file changed, 21 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0d3588aa/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
index e49bc0e..cc3f4ba 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
@@ -193,7 +193,13 @@ namespace Lucene.Net.Codecs.Memory
         {
             internal abstract class TermAndSkip
             {
-                public int[] skips; // LUCENENET TODO: Make property
+                [WritableArray]
+                public int[] Skips
+                {
+                    get { return skips; }
+                    set { skips = value; }
+                }
+                private int[] skips;
 
                 /// <summary>
                 /// Returns the approximate number of RAM bytes used </summary>
@@ -565,13 +571,13 @@ namespace Lucene.Net.Codecs.Memory
                 int skipOffset = 0;
                 for (int i = 0; i < numTerms; i++)
                 {
-                    int[] termSkips = terms[i].skips;
+                    int[] termSkips = terms[i].Skips;
                     skipOffsets[i] = skipOffset;
                     if (termSkips != null)
                     {
                         Array.Copy(termSkips, 0, skips, skipOffset, termSkips.Length);
                         skipOffset += termSkips.Length;
-                        terms[i].skips = null;
+                        terms[i].Skips = null;
                     }
                 }
                 this.skipOffsets[numTerms] = skipOffset;
@@ -705,15 +711,15 @@ namespace Lucene.Net.Codecs.Memory
                 for (int termID = 0; termID < terms.Length; termID++)
                 {
                     TermAndSkip term = terms[termID];
-                    if (term.skips != null && term.skips.Length > 1)
+                    if (term.Skips != null && term.Skips.Length > 1)
                     {
-                        for (int pos = 0; pos < term.skips.Length/2; pos++)
+                        for (int pos = 0; pos < term.Skips.Length/2; pos++)
                         {
-                            int otherPos = term.skips.Length - pos - 1;
+                            int otherPos = term.Skips.Length - pos - 1;
 
-                            int temp = term.skips[pos];
-                            term.skips[pos] = term.skips[otherPos];
-                            term.skips[otherPos] = temp;
+                            int temp = term.Skips[pos];
+                            term.Skips[pos] = term.Skips[otherPos];
+                            term.Skips[otherPos] = temp;
                         }
                     }
                 }
@@ -723,9 +729,9 @@ namespace Lucene.Net.Codecs.Memory
             {
                 TermAndSkip term = terms[ord - backCount];
                 skipCount++;
-                if (term.skips == null)
+                if (term.Skips == null)
                 {
-                    term.skips = new int[] {ord};
+                    term.Skips = new int[] {ord};
                 }
                 else
                 {
@@ -733,10 +739,10 @@ namespace Lucene.Net.Codecs.Memory
                     // given that the skips themselves are already log(N)
                     // we can grow by only 1 and still have amortized
                     // linear time:
-                    int[] newSkips = new int[term.skips.Length + 1];
-                    Array.Copy(term.skips, 0, newSkips, 0, term.skips.Length);
-                    term.skips = newSkips;
-                    term.skips[term.skips.Length - 1] = ord;
+                    int[] newSkips = new int[term.Skips.Length + 1];
+                    Array.Copy(term.Skips, 0, newSkips, 0, term.Skips.Length);
+                    term.Skips = newSkips;
+                    term.Skips[term.Skips.Length - 1] = ord;
                 }
             }
 


[25/37] lucenenet git commit: Lucene.Net.Codecs.Bloom.MurmurHash2 refactor: Changed uint parameter in Hash function to int, added unchecked cast to overflow the constant, and removed unnecessary array cast

Posted by ni...@apache.org.
Lucene.Net.Codecs.Bloom.MurmurHash2 refactor: Changed uint parameter in Hash function to int, added unchecked cast to overflow the constant, and removed unnecessary array cast


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

Branch: refs/heads/api-work
Commit: fd5785269554a007ddedb5a28defae7687f4d56e
Parents: e106720
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 17:07:33 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:26 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fd578526/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs b/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
index b638e24..9992971 100644
--- a/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
+++ b/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
@@ -42,11 +42,11 @@ namespace Lucene.Net.Codecs.Bloom
         {
         }
 
-        public static int Hash(byte[] data, uint seed, int offset, int len) // LUCENENET TODO: Change to int
+        public static int Hash(byte[] data, int seed, int offset, int len)
         {
             int m = 0x5bd1e995;
             int r = 24;
-            int h = (int)(seed ^ (long)len);
+            int h = (int)(((uint)seed) ^ (long)len); // LUCENENET NOTE: Need to convert seed to uint (since the constant was a uint)
             int len_4 = len >> 2;
             for (int i = 0; i < len_4; i++)
             {
@@ -97,12 +97,12 @@ namespace Lucene.Net.Codecs.Bloom
         /// <returns>32 bit hash of the given array</returns>
         public static int Hash32(byte[] data, int offset, int len)
         {
-            return Hash(data, 0x9747b28c, offset, len);
+            return Hash(data, unchecked((int)0x9747b28c), offset, len);
         }
 
         public override int Hash(BytesRef br)
         {
-            return Hash32((byte[])(Array)br.Bytes, br.Offset, br.Length); // LUCENENET TODO: remove unnecessary cast
+            return Hash32(br.Bytes, br.Offset, br.Length);
         }
     }
 }


[17/37] lucenenet git commit: Lucene.Net.Codecs.Bloom.BloomFilteringPostingsFormat.BloomFilteredFieldsProducer.BloomFilteredTermsEnum refactor: Delegate() > Delegate

Posted by ni...@apache.org.
Lucene.Net.Codecs.Bloom.BloomFilteringPostingsFormat.BloomFilteredFieldsProducer.BloomFilteredTermsEnum refactor: Delegate() > Delegate


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

Branch: refs/heads/api-work
Commit: 13ba9d33c83ae6c196044f8e4645810a8a1acd0f
Parents: 0ad5d6f
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 15:31:09 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:22 2017 +0700

----------------------------------------------------------------------
 .../Bloom/BloomFilteringPostingsFormat.cs       | 35 +++++++++++---------
 1 file changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/13ba9d33/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
index 0da915d..6ef2c7a 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -313,18 +313,21 @@ namespace Lucene.Net.Codecs.Bloom
                     delegateTermsEnum = null;
                 }
 
-                private TermsEnum Delegate() // LUCENENET TODO: Make property
+                private TermsEnum Delegate
                 {
-                    // pull the iterator only if we really need it -
-                    // this can be a relativly heavy operation depending on the 
-                    // delegate postings format and they underlying directory
-                    // (clone IndexInput)
-                    return delegateTermsEnum ?? (delegateTermsEnum = _delegateTerms.GetIterator(_reuseDelegate));
+                    get
+                    {
+                        // pull the iterator only if we really need it -
+                        // this can be a relativly heavy operation depending on the 
+                        // delegate postings format and they underlying directory
+                        // (clone IndexInput)
+                        return delegateTermsEnum ?? (delegateTermsEnum = _delegateTerms.GetIterator(_reuseDelegate));
+                    }
                 }
 
                 public override sealed BytesRef Next()
                 {
-                    return Delegate().Next();
+                    return Delegate.Next();
                 }
 
                 public override sealed IComparer<BytesRef> Comparer
@@ -343,48 +346,48 @@ namespace Lucene.Net.Codecs.Bloom
                     {
                         return false;
                     }
-                    return Delegate().SeekExact(text);
+                    return Delegate.SeekExact(text);
                 }
 
                 public override sealed SeekStatus SeekCeil(BytesRef text)
                 {
-                    return Delegate().SeekCeil(text);
+                    return Delegate.SeekCeil(text);
                 }
 
                 public override sealed void SeekExact(long ord)
                 {
-                    Delegate().SeekExact(ord);
+                    Delegate.SeekExact(ord);
                 }
 
                 public override sealed BytesRef Term
                 {
-                    get { return Delegate().Term; }
+                    get { return Delegate.Term; }
                 }
 
                 public override sealed long Ord
                 {
-                    get { return Delegate().Ord; }
+                    get { return Delegate.Ord; }
                 }
 
                 public override sealed int DocFreq
                 {
-                    get { return Delegate().DocFreq; }
+                    get { return Delegate.DocFreq; }
                 }
 
                 public override sealed long TotalTermFreq
                 {
-                    get { return Delegate().TotalTermFreq; }
+                    get { return Delegate.TotalTermFreq; }
                 }
 
                 public override DocsAndPositionsEnum DocsAndPositions(IBits liveDocs,
                     DocsAndPositionsEnum reuse, int flags)
                 {
-                    return Delegate().DocsAndPositions(liveDocs, reuse, flags);
+                    return Delegate.DocsAndPositions(liveDocs, reuse, flags);
                 }
 
                 public override DocsEnum Docs(IBits liveDocs, DocsEnum reuse, int flags)
                 {
-                    return Delegate().Docs(liveDocs, reuse, flags);
+                    return Delegate.Docs(liveDocs, reuse, flags);
                 }
             }
 


[34/37] lucenenet git commit: Lucene.Net.Codecs: license headers and usings

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
index ffb9752..5a89edd 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsFormat.cs
@@ -1,22 +1,21 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.SimpleText
+\ufeffnamespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     using FieldInfos = Index.FieldInfos;
     using SegmentInfo = Index.SegmentInfo;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
index 0b82c9f..d40d03a 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsReader.cs
@@ -1,46 +1,44 @@
-\ufeff/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+\ufeffusing System;
+using System.Diagnostics;
+using System.Globalization;
+using System.Text;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using System;
-    using System.Diagnostics;
-    using System.Globalization;
-    using System.Text;
-    using Support;
-
-	using FieldInfo = Index.FieldInfo;
-	using FieldInfos = Index.FieldInfos;
-	using IndexFileNames = Index.IndexFileNames;
-	using SegmentInfo = Index.SegmentInfo;
-	using StoredFieldVisitor = Index.StoredFieldVisitor;
-	using AlreadyClosedException = Store.AlreadyClosedException;
-	using BufferedChecksumIndexInput = Store.BufferedChecksumIndexInput;
-	using ChecksumIndexInput = Store.ChecksumIndexInput;
-	using Directory = Store.Directory;
-	using IOContext = Store.IOContext;
-	using IndexInput = Store.IndexInput;
-	using ArrayUtil = Util.ArrayUtil;
-	using BytesRef = Util.BytesRef;
-	using CharsRef = Util.CharsRef;
-	using IOUtils = Util.IOUtils;
-	using StringHelper = Util.StringHelper;
-	using UnicodeUtil = Util.UnicodeUtil;
+    using AlreadyClosedException = Store.AlreadyClosedException;
+    using ArrayUtil = Util.ArrayUtil;
+    using BufferedChecksumIndexInput = Store.BufferedChecksumIndexInput;
+    using BytesRef = Util.BytesRef;
+    using CharsRef = Util.CharsRef;
+    using ChecksumIndexInput = Store.ChecksumIndexInput;
+    using Directory = Store.Directory;
+    using FieldInfo = Index.FieldInfo;
+    using FieldInfos = Index.FieldInfos;
+    using IndexFileNames = Index.IndexFileNames;
+    using IndexInput = Store.IndexInput;
+    using IOContext = Store.IOContext;
+    using IOUtils = Util.IOUtils;
+    using SegmentInfo = Index.SegmentInfo;
+    using StoredFieldVisitor = Index.StoredFieldVisitor;
+    using StringHelper = Util.StringHelper;
+    using UnicodeUtil = Util.UnicodeUtil;
 
     /// <summary>
     /// reads plaintext stored fields

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
index 1ac0b12..67c5cc5 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextStoredFieldsWriter.cs
@@ -1,35 +1,34 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing System;
+using System.Globalization;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
-
-    using System;
-    using System.Globalization;
-
-	using FieldInfo = Index.FieldInfo;
-	using FieldInfos = Index.FieldInfos;
-	using IndexFileNames = Index.IndexFileNames;
-	using IIndexableField = Index.IIndexableField;
-	using Directory = Store.Directory;
-	using IOContext = Store.IOContext;
-	using IndexOutput = Store.IndexOutput;
-	using BytesRef = Util.BytesRef;
-	using IOUtils = Util.IOUtils;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    using BytesRef = Util.BytesRef;
+    using Directory = Store.Directory;
+    using FieldInfo = Index.FieldInfo;
+    using FieldInfos = Index.FieldInfos;
+    using IIndexableField = Index.IIndexableField;
+    using IndexFileNames = Index.IndexFileNames;
+    using IndexOutput = Store.IndexOutput;
+    using IOContext = Store.IOContext;
+    using IOUtils = Util.IOUtils;
 
     /// <summary>
     /// Writes plain-text stored fields.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
index 8de14c1..a8d38fe 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsFormat.cs
@@ -1,22 +1,22 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.SimpleText
+\ufeffnamespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
     using FieldInfos = Index.FieldInfos;
     using SegmentInfo = Index.SegmentInfo;
     using Directory = Store.Directory;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
index be43312..a6d5f5b 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
@@ -1,51 +1,49 @@
-\ufeff/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
+\ufeffusing Lucene.Net.Support;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
 using System.Linq;
-using Lucene.Net.Support;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
-    
-    using System;
-    using System.Diagnostics;
-    using System.Globalization;
-    using System.Collections.Generic;
-
-	using DocsAndPositionsEnum = Index.DocsAndPositionsEnum;
-	using DocsEnum = Index.DocsEnum;
-	using Fields = Index.Fields;
-	using IndexFileNames = Index.IndexFileNames;
-	using SegmentInfo = Index.SegmentInfo;
-	using Terms = Index.Terms;
-	using TermsEnum = Index.TermsEnum;
-	using AlreadyClosedException = Store.AlreadyClosedException;
-	using BufferedChecksumIndexInput = Store.BufferedChecksumIndexInput;
-	using ChecksumIndexInput = Store.ChecksumIndexInput;
-	using Directory = Store.Directory;
-	using IOContext = Store.IOContext;
-	using IndexInput = Store.IndexInput;
-	using ArrayUtil = Util.ArrayUtil;
-	using IBits = Util.IBits;
-	using BytesRef = Util.BytesRef;
-	using CharsRef = Util.CharsRef;
-	using IOUtils = Util.IOUtils;
-	using StringHelper = Util.StringHelper;
-	using UnicodeUtil = Util.UnicodeUtil;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    using AlreadyClosedException = Store.AlreadyClosedException;
+    using ArrayUtil = Util.ArrayUtil;
+    using BufferedChecksumIndexInput = Store.BufferedChecksumIndexInput;
+    using BytesRef = Util.BytesRef;
+    using CharsRef = Util.CharsRef;
+    using ChecksumIndexInput = Store.ChecksumIndexInput;
+    using Directory = Store.Directory;
+    using DocsAndPositionsEnum = Index.DocsAndPositionsEnum;
+    using DocsEnum = Index.DocsEnum;
+    using Fields = Index.Fields;
+    using IBits = Util.IBits;
+    using IndexFileNames = Index.IndexFileNames;
+    using IndexInput = Store.IndexInput;
+    using IOContext = Store.IOContext;
+    using IOUtils = Util.IOUtils;
+    using SegmentInfo = Index.SegmentInfo;
+    using StringHelper = Util.StringHelper;
+    using Terms = Index.Terms;
+    using TermsEnum = Index.TermsEnum;
+    using UnicodeUtil = Util.UnicodeUtil;
 
     /// <summary>
     /// Reads plain-text term vectors.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
index 7b6376f..b9d0bb6 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsWriter.cs
@@ -1,34 +1,34 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using System;
-    using System.Diagnostics;
-    using System.Collections.Generic;
-    using System.Globalization;
+    using BytesRef = Util.BytesRef;
+    using Directory = Store.Directory;
     using FieldInfo = Index.FieldInfo;
     using FieldInfos = Index.FieldInfos;
     using IndexFileNames = Index.IndexFileNames;
-    using Directory = Store.Directory;
-    using IOContext = Store.IOContext;
     using IndexOutput = Store.IndexOutput;
-    using BytesRef = Util.BytesRef;
+    using IOContext = Store.IOContext;
     using IOUtils = Util.IOUtils;
 
     /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
index 898cce6..65aeedd 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextUtil.cs
@@ -1,24 +1,23 @@
 \ufeffusing System.Globalization;
 
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
 namespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     using CorruptIndexException = Index.CorruptIndexException;
     using ChecksumIndexInput = Store.ChecksumIndexInput;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Core/Util/Fst/Util.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/Util.cs b/src/Lucene.Net.Core/Util/Fst/Util.cs
index 0c2203e..ad7d2cb 100644
--- a/src/Lucene.Net.Core/Util/Fst/Util.cs
+++ b/src/Lucene.Net.Core/Util/Fst/Util.cs
@@ -29,7 +29,7 @@ namespace Lucene.Net.Util.Fst
     ///
     /// @lucene.experimental
     /// </summary>
-    public sealed class Util
+    public sealed class Util // LUCENENET TODO: Fix naming conflict with containing namespace
     {
         private Util()
         {


[13/37] lucenenet git commit: Lucene.Net.Codecs: Renamed fields from UPPER_CASE to camelCase

Posted by ni...@apache.org.
Lucene.Net.Codecs: Renamed fields from UPPER_CASE to camelCase


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

Branch: refs/heads/api-work
Commit: f50b03551df0a02a83df9de04a95074121032957
Parents: 0f32196
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 15:24:11 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:20 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs  |  98 ++++----
 src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs  |  20 +-
 src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs  |  14 +-
 .../Memory/MemoryDocValuesFormat.cs             |   6 +-
 .../Pulsing/PulsingPostingsWriter.cs            |  30 +--
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs  |  12 +-
 src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs  | 252 +++++++++----------
 .../SimpleText/SimpleTextDocValuesReader.cs     |  98 ++++----
 .../SimpleText/SimpleTextLiveDocsFormat.cs      |  20 +-
 .../SimpleText/SimpleTextTermVectorsReader.cs   |  52 ++--
 10 files changed, 301 insertions(+), 301 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f50b0355/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs b/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
index debef54..34a45d8 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
@@ -50,25 +50,25 @@ namespace Lucene.Net.Codecs.Memory
         /// </summary>
         internal class TermData
         {
-            internal long[] LONGS; // LUCENENET TODO: Rename longs
-            internal byte[] BYTES; // LUCENENET TODO: Rename bytes
-            internal int DOC_FREQ; // LUCENENET TODO: Rename docFreq
-            internal long TOTAL_TERM_FREQ; // LUCENENET TODO: Rename totalTermFreq
+            internal long[] longs;
+            internal byte[] bytes;
+            internal int docFreq;
+            internal long totalTermFreq;
 
             internal TermData()
             {
-                LONGS = null;
-                BYTES = null;
-                DOC_FREQ = 0;
-                TOTAL_TERM_FREQ = -1;
+                longs = null;
+                bytes = null;
+                docFreq = 0;
+                totalTermFreq = -1;
             }
 
             internal TermData(long[] longs, byte[] bytes, int docFreq, long totalTermFreq)
             {
-                LONGS = longs;
-                BYTES = bytes;
-                DOC_FREQ = docFreq;
-                TOTAL_TERM_FREQ = totalTermFreq;
+                this.longs = longs;
+                this.bytes = bytes;
+                this.docFreq = docFreq;
+                this.totalTermFreq = totalTermFreq;
             }
 
             // NOTE: actually, FST nodes are seldom 
@@ -77,24 +77,24 @@ namespace Lucene.Net.Codecs.Memory
             public override int GetHashCode()
             {
                 var hash = 0;
-                if (LONGS != null)
+                if (longs != null)
                 {
-                    var end = LONGS.Length;
+                    var end = longs.Length;
                     for (var i = 0; i < end; i++)
                     {
-                        hash -= (int) LONGS[i];
+                        hash -= (int) longs[i];
                     }
                 }
-                if (BYTES != null)
+                if (bytes != null)
                 {
                     hash = -hash;
-                    var end = BYTES.Length;
+                    var end = bytes.Length;
                     for (var i = 0; i < end; i++)
                     {
-                        hash += BYTES[i];
+                        hash += bytes[i];
                     }
                 }
-                hash += (int) (DOC_FREQ + TOTAL_TERM_FREQ);
+                hash += (int) (docFreq + totalTermFreq);
                 return hash;
             }
 
@@ -131,9 +131,9 @@ namespace Lucene.Net.Codecs.Memory
             if (Equals(t1, NO_OUTPUT) || Equals(t2, NO_OUTPUT))
                 return NO_OUTPUT;
             
-            Debug.Assert(t1.LONGS.Length == t2.LONGS.Length);
+            Debug.Assert(t1.longs.Length == t2.longs.Length);
 
-            long[] min = t1.LONGS, max = t2.LONGS;
+            long[] min = t1.longs, max = t2.longs;
             int pos = 0;
             TermData ret;
 
@@ -145,8 +145,8 @@ namespace Lucene.Net.Codecs.Memory
             {
                 if (min[pos] > max[pos])
                 {
-                    min = t2.LONGS;
-                    max = t1.LONGS;
+                    min = t2.longs;
+                    max = t1.longs;
                 }
                 // check whether strictly smaller
                 while (pos < _longsSize && min[pos] <= max[pos])
@@ -186,7 +186,7 @@ namespace Lucene.Net.Codecs.Memory
             if (Equals(t2, NO_OUTPUT))
                 return t1;
             
-            Debug.Assert(t1.LONGS.Length == t2.LONGS.Length);
+            Debug.Assert(t1.longs.Length == t2.longs.Length);
 
             int pos = 0;
             long diff = 0;
@@ -194,7 +194,7 @@ namespace Lucene.Net.Codecs.Memory
 
             while (pos < _longsSize)
             {
-                share[pos] = t1.LONGS[pos] - t2.LONGS[pos];
+                share[pos] = t1.longs[pos] - t2.longs[pos];
                 diff += share[pos];
                 pos++;
             }
@@ -206,7 +206,7 @@ namespace Lucene.Net.Codecs.Memory
             }
             else
             {
-                ret = new TermData(share, t1.BYTES, t1.DOC_FREQ, t1.TOTAL_TERM_FREQ);
+                ret = new TermData(share, t1.bytes, t1.docFreq, t1.totalTermFreq);
             }
             //if (TEST) System.out.println("ret:"+ret);
             return ret;
@@ -223,25 +223,25 @@ namespace Lucene.Net.Codecs.Memory
             if (Equals(t2, NO_OUTPUT))
                 return t1;
             
-            Debug.Assert(t1.LONGS.Length == t2.LONGS.Length);
+            Debug.Assert(t1.longs.Length == t2.longs.Length);
 
             var pos = 0;
             var accum = new long[_longsSize];
 
             while (pos < _longsSize)
             {
-                accum[pos] = t1.LONGS[pos] + t2.LONGS[pos];
+                accum[pos] = t1.longs[pos] + t2.longs[pos];
                 pos++;
             }
 
             TermData ret;
-            if (t2.BYTES != null || t2.DOC_FREQ > 0)
+            if (t2.bytes != null || t2.docFreq > 0)
             {
-                ret = new TermData(accum, t2.BYTES, t2.DOC_FREQ, t2.TOTAL_TERM_FREQ);
+                ret = new TermData(accum, t2.bytes, t2.docFreq, t2.totalTermFreq);
             }
             else
             {
-                ret = new TermData(accum, t1.BYTES, t1.DOC_FREQ, t1.TOTAL_TERM_FREQ);
+                ret = new TermData(accum, t1.bytes, t1.docFreq, t1.totalTermFreq);
             }
 
             return ret;
@@ -249,21 +249,21 @@ namespace Lucene.Net.Codecs.Memory
 
         public override void Write(TermData data, DataOutput output)
         {
-            int bit0 = AllZero(data.LONGS) ? 0 : 1;
-            int bit1 = ((data.BYTES == null || data.BYTES.Length == 0) ? 0 : 1) << 1;
-            int bit2 = ((data.DOC_FREQ == 0) ? 0 : 1) << 2;
+            int bit0 = AllZero(data.longs) ? 0 : 1;
+            int bit1 = ((data.bytes == null || data.bytes.Length == 0) ? 0 : 1) << 1;
+            int bit2 = ((data.docFreq == 0) ? 0 : 1) << 2;
             int bits = bit0 | bit1 | bit2;
             if (bit1 > 0) // determine extra length
             {
-                if (data.BYTES.Length < 32)
+                if (data.bytes.Length < 32)
                 {
-                    bits |= (data.BYTES.Length << 3);
+                    bits |= (data.bytes.Length << 3);
                     output.WriteByte((byte) bits);
                 }
                 else
                 {
                     output.WriteByte((byte) bits);
-                    output.WriteVInt(data.BYTES.Length);
+                    output.WriteVInt(data.bytes.Length);
                 }
             }
             else
@@ -274,30 +274,30 @@ namespace Lucene.Net.Codecs.Memory
             {
                 for (int pos = 0; pos < _longsSize; pos++)
                 {
-                    output.WriteVLong(data.LONGS[pos]);
+                    output.WriteVLong(data.longs[pos]);
                 }
             }
             if (bit1 > 0) // bytes exists
             {
-                output.WriteBytes(data.BYTES, 0, data.BYTES.Length);
+                output.WriteBytes(data.bytes, 0, data.bytes.Length);
             }
             if (bit2 > 0) // stats exist
             {
                 if (_hasPos)
                 {
-                    if (data.DOC_FREQ == data.TOTAL_TERM_FREQ)
+                    if (data.docFreq == data.totalTermFreq)
                     {
-                        output.WriteVInt((data.DOC_FREQ << 1) | 1);
+                        output.WriteVInt((data.docFreq << 1) | 1);
                     }
                     else
                     {
-                        output.WriteVInt((data.DOC_FREQ << 1));
-                        output.WriteVLong(data.TOTAL_TERM_FREQ - data.DOC_FREQ);
+                        output.WriteVInt((data.docFreq << 1));
+                        output.WriteVLong(data.totalTermFreq - data.docFreq);
                     }
                 }
                 else
                 {
-                    output.WriteVInt(data.DOC_FREQ);
+                    output.WriteVInt(data.docFreq);
                 }
             }
         }
@@ -360,25 +360,25 @@ namespace Lucene.Net.Codecs.Memory
 
         private static bool StatsEqual(TermData t1, TermData t2)
         {
-            return t1.DOC_FREQ == t2.DOC_FREQ && t1.TOTAL_TERM_FREQ == t2.TOTAL_TERM_FREQ;
+            return t1.docFreq == t2.docFreq && t1.totalTermFreq == t2.totalTermFreq;
         }
 
         private static bool BytesEqual(TermData t1, TermData t2)
         {
-            if (t1.BYTES == null && t2.BYTES == null)
+            if (t1.bytes == null && t2.bytes == null)
             {
                 return true;
             }
-            return t1.BYTES != null && t2.BYTES != null && Arrays.Equals(t1.BYTES, t2.BYTES);
+            return t1.bytes != null && t2.bytes != null && Arrays.Equals(t1.bytes, t2.bytes);
         }
 
         private static bool LongsEqual(TermData t1, TermData t2)
         {
-            if (t1.LONGS == null && t2.LONGS == null)
+            if (t1.longs == null && t2.longs == null)
             {
                 return true;
             }
-            return t1.LONGS != null && t2.LONGS != null && Arrays.Equals(t1.LONGS, t2.LONGS);
+            return t1.longs != null && t2.longs != null && Arrays.Equals(t1.longs, t2.longs);
         }
 
         private static bool AllZero(long[] l)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f50b0355/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
index 7a2df34..9b68452 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
@@ -388,11 +388,11 @@ namespace Lucene.Net.Codecs.Memory
                 {
                     if (!decoded && !seekPending)
                     {
-                        if (meta.BYTES != null)
+                        if (meta.bytes != null)
                         {
-                            bytesReader.Reset(meta.BYTES, 0, meta.BYTES.Length);
+                            bytesReader.Reset(meta.bytes, 0, meta.bytes.Length);
                         }
-                        outerInstance.outerInstance.postingsReader.DecodeTerm(meta.LONGS, bytesReader, outerInstance.fieldInfo, state, true);
+                        outerInstance.outerInstance.postingsReader.DecodeTerm(meta.longs, bytesReader, outerInstance.fieldInfo, state, true);
                         decoded = true;
                     }
                 }
@@ -408,8 +408,8 @@ namespace Lucene.Net.Codecs.Memory
                     {
                         term_Renamed = pair.Input;
                         meta = pair.Output;
-                        state.DocFreq = meta.DOC_FREQ;
-                        state.TotalTermFreq = meta.TOTAL_TERM_FREQ;
+                        state.DocFreq = meta.docFreq;
+                        state.TotalTermFreq = meta.totalTermFreq;
                     }
                     decoded = false;
                     seekPending = false;
@@ -564,11 +564,11 @@ namespace Lucene.Net.Codecs.Memory
                     Debug.Assert(term_Renamed != null);
                     if (!decoded)
                     {
-                        if (meta.BYTES != null)
+                        if (meta.bytes != null)
                         {
-                            bytesReader.Reset(meta.BYTES, 0, meta.BYTES.Length);
+                            bytesReader.Reset(meta.bytes, 0, meta.bytes.Length);
                         }
-                        outerInstance.outerInstance.postingsReader.DecodeTerm(meta.LONGS, bytesReader, outerInstance.fieldInfo, state, true);
+                        outerInstance.outerInstance.postingsReader.DecodeTerm(meta.longs, bytesReader, outerInstance.fieldInfo, state, true);
                         decoded = true;
                     }
                 }
@@ -595,8 +595,8 @@ namespace Lucene.Net.Codecs.Memory
                     {
                         meta = last.Output;
                     }
-                    state.DocFreq = meta.DOC_FREQ;
-                    state.TotalTermFreq = meta.TOTAL_TERM_FREQ;
+                    state.DocFreq = meta.docFreq;
+                    state.TotalTermFreq = meta.totalTermFreq;
                 }
 
                 public override SeekStatus SeekCeil(BytesRef target)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f50b0355/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs b/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
index 0cc3700..636f0fe 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
@@ -269,18 +269,18 @@ namespace Lucene.Net.Codecs.Memory
 
                 var meta = new FSTTermOutputs.TermData
                 {
-                    LONGS = new long[_longsSize],
-                    BYTES = null,
-                    DOC_FREQ = state.DocFreq = stats.DocFreq,
-                    TOTAL_TERM_FREQ = state.TotalTermFreq = stats.TotalTermFreq
+                    longs = new long[_longsSize],
+                    bytes = null,
+                    docFreq = state.DocFreq = stats.DocFreq,
+                    totalTermFreq = state.TotalTermFreq = stats.TotalTermFreq
                 };
                 _outerInstance._postingsWriter.FinishTerm(state);
-                _outerInstance._postingsWriter.EncodeTerm(meta.LONGS, _metaWriter, _fieldInfo, state, true);
+                _outerInstance._postingsWriter.EncodeTerm(meta.longs, _metaWriter, _fieldInfo, state, true);
                 var bytesSize = (int) _metaWriter.FilePointer;
                 if (bytesSize > 0)
                 {
-                    meta.BYTES = new byte[bytesSize];
-                    _metaWriter.WriteTo(meta.BYTES, 0);
+                    meta.bytes = new byte[bytesSize];
+                    _metaWriter.WriteTo(meta.bytes, 0);
                     _metaWriter.Reset();
                 }
                 _builder.Add(Util.ToIntsRef(text, _scratchTerm), meta);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f50b0355/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
index 4ff0e52..be8ca94 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
@@ -28,7 +28,7 @@ namespace Lucene.Net.Codecs.Memory
         /// <summary>Maximum length for each binary doc values field. </summary>
         public static readonly int MAX_BINARY_FIELD_LENGTH = (1 << 15) - 2;
 
-        internal readonly float ACCEPTABLE_OVERHEAD_RATIO; // LUCENENET TODO: Rename acceptableOverheadRatio
+        internal readonly float acceptableOverheadRatio;
 
         /// <summary>
         /// Calls {@link #MemoryDocValuesFormat(float) 
@@ -49,13 +49,13 @@ namespace Lucene.Net.Codecs.Memory
         public MemoryDocValuesFormat(float acceptableOverheadRatio) 
             : base("Memory")
         {
-            ACCEPTABLE_OVERHEAD_RATIO = acceptableOverheadRatio;
+            this.acceptableOverheadRatio = acceptableOverheadRatio;
         }
 
         public override DocValuesConsumer FieldsConsumer(SegmentWriteState state)
         {
             return new MemoryDocValuesConsumer(state, DATA_CODEC, DATA_EXTENSION, METADATA_CODEC, METADATA_EXTENSION,
-                ACCEPTABLE_OVERHEAD_RATIO);
+                acceptableOverheadRatio);
         }
 
         public override DocValuesProducer FieldsProducer(SegmentReadState state)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f50b0355/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
index f93b2b0..3b1aa77 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
@@ -64,16 +64,16 @@ namespace Lucene.Net.Codecs.Pulsing
 
         private class PulsingTermState : BlockTermState
         {
-            internal byte[] BYTES; // LUCENENET TODO: Rename bytes
-            internal BlockTermState WRAPPED_STATE; // LUCENENET TODO: Rename wrappedState
+            internal byte[] bytes;
+            internal BlockTermState wrappedState;
 
             public override string ToString()
             {
-                if (BYTES != null)
+                if (bytes != null)
                 {
                     return "inlined";
                 }
-                return "not inlined wrapped=" + WRAPPED_STATE;
+                return "not inlined wrapped=" + wrappedState;
             }
         }
 
@@ -140,7 +140,7 @@ namespace Lucene.Net.Codecs.Pulsing
 
         public override BlockTermState NewTermState()
         {
-            var state = new PulsingTermState {WRAPPED_STATE = _wrappedPostingsWriter.NewTermState()};
+            var state = new PulsingTermState {wrappedState = _wrappedPostingsWriter.NewTermState()};
             return state;
         }
 
@@ -269,10 +269,10 @@ namespace Lucene.Net.Codecs.Pulsing
 
             if (_pendingCount == -1)
             {
-                state.WRAPPED_STATE.DocFreq = state.DocFreq;
-                state.WRAPPED_STATE.TotalTermFreq = state.TotalTermFreq;
-                state.BYTES = null;
-                _wrappedPostingsWriter.FinishTerm(state.WRAPPED_STATE);
+                state.wrappedState.DocFreq = state.DocFreq;
+                state.wrappedState.TotalTermFreq = state.TotalTermFreq;
+                state.bytes = null;
+                _wrappedPostingsWriter.FinishTerm(state.wrappedState);
             }
             else
             {
@@ -403,8 +403,8 @@ namespace Lucene.Net.Codecs.Pulsing
                         break;
                 }
 
-                state.BYTES = new byte[(int) _buffer.FilePointer];
-                _buffer.WriteTo(state.BYTES, 0);
+                state.bytes = new byte[(int) _buffer.FilePointer];
+                _buffer.WriteTo(state.bytes, 0);
                 _buffer.Reset();
             }
             _pendingCount = 0;
@@ -416,9 +416,9 @@ namespace Lucene.Net.Codecs.Pulsing
             var _state = (PulsingTermState) state;
             Debug.Assert(empty.Length == 0);
             _absolute = _absolute || abs;
-            if (_state.BYTES == null)
+            if (_state.bytes == null)
             {
-                _wrappedPostingsWriter.EncodeTerm(_longs, _buffer, fieldInfo, _state.WRAPPED_STATE, _absolute);
+                _wrappedPostingsWriter.EncodeTerm(_longs, _buffer, fieldInfo, _state.wrappedState, _absolute);
                 for (var i = 0; i < _longsSize; i++)
                 {
                     output.WriteVLong(_longs[i]);
@@ -429,8 +429,8 @@ namespace Lucene.Net.Codecs.Pulsing
             }
             else
             {
-                output.WriteVInt(_state.BYTES.Length);
-                output.WriteBytes(_state.BYTES, 0, _state.BYTES.Length);
+                output.WriteVInt(_state.bytes.Length);
+                output.WriteBytes(_state.bytes, 0, _state.bytes.Length);
                 _absolute = _absolute || abs;
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f50b0355/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
index 84cf0e5..6aa63b2 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
@@ -256,7 +256,7 @@ namespace Lucene.Net.Codecs.Sep
             else
             {
                 docsEnum = (SepDocsEnum) reuse;
-                if (docsEnum.START_DOC_IN != _docIn)
+                if (docsEnum.startDocIn != _docIn)
                 {
                     // If you are using ParellelReader, and pass in a
                     // reused DocsAndPositionsEnum, it could have come
@@ -282,7 +282,7 @@ namespace Lucene.Net.Codecs.Sep
             else
             {
                 postingsEnum = (SepDocsAndPositionsEnum) reuse;
-                if (postingsEnum.START_DOC_IN != _docIn)
+                if (postingsEnum.startDocIn != _docIn)
                 {
                     // If you are using ParellelReader, and pass in a
                     // reused DocsAndPositionsEnum, it could have come
@@ -316,7 +316,7 @@ namespace Lucene.Net.Codecs.Sep
             private readonly IntIndexInput.AbstractIndex _docIndex;
             private readonly IntIndexInput.AbstractIndex _freqIndex;
             private readonly IntIndexInput.AbstractIndex _posIndex;
-            internal IntIndexInput START_DOC_IN; // LUCENENET TODO: Rename startDocIn
+            internal IntIndexInput startDocIn;
 
             // TODO: -- should we do hasProx with 2 different enum classes?
 
@@ -340,7 +340,7 @@ namespace Lucene.Net.Codecs.Sep
                 }
                 _posIndex = outerInstance._posIn != null ? outerInstance._posIn.GetIndex() : null;
 
-                START_DOC_IN = outerInstance._docIn;
+                startDocIn = outerInstance._docIn;
             }
 
             internal virtual SepDocsEnum Init(FieldInfo fieldInfo, SepTermState termState, IBits liveDocs)
@@ -495,7 +495,7 @@ namespace Lucene.Net.Codecs.Sep
             private readonly IntIndexInput.AbstractIndex _docIndex;
             private readonly IntIndexInput.AbstractIndex _freqIndex;
             private readonly IntIndexInput.AbstractIndex _posIndex;
-            internal IntIndexInput START_DOC_IN; // LUCENENET TODO: Rename startDocIn
+            internal IntIndexInput startDocIn;
 
             private long _payloadFp;
 
@@ -520,7 +520,7 @@ namespace Lucene.Net.Codecs.Sep
                 _posIndex = outerInstance._posIn.GetIndex();
                 _payloadIn = (IndexInput) outerInstance._payloadIn.Clone();
 
-                START_DOC_IN = outerInstance._docIn;
+                startDocIn = outerInstance._docIn;
             }
 
             internal virtual SepDocsAndPositionsEnum Init(FieldInfo fieldInfo, SepTermState termState, IBits liveDocs)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f50b0355/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
index 17f3eed..280d048 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
@@ -42,20 +42,20 @@ namespace Lucene.Net.Codecs.Sep
         internal const int VERSION_START = 0;
         internal const int VERSION_CURRENT = VERSION_START;
 
-        internal IntIndexOutput FREQ_OUT; // LUCENENET TODO: Rename freqOut
-        internal IntIndexOutputIndex FREQ_INDEX; // LUCENENET TODO: Rename camelCase
+        internal IntIndexOutput freqOut;
+        internal IntIndexOutputIndex freqIndex;
 
-        internal IntIndexOutput POS_OUT; // LUCENENET TODO: Rename  camelCase
-        internal IntIndexOutputIndex POS_INDEX; // LUCENENET TODO: Rename  camelCase
+        internal IntIndexOutput posOut;
+        internal IntIndexOutputIndex posIndex;
 
-        internal IntIndexOutput DOC_OUT; // LUCENENET TODO: Rename  camelCase
-        internal IntIndexOutputIndex DOC_INDEX; // LUCENENET TODO: Rename  camelCase
+        internal IntIndexOutput docOut;
+        internal IntIndexOutputIndex docIndex;
 
-        internal IndexOutput PAYLOAD_OUT; // LUCENENET TODO: Rename  camelCase
+        internal IndexOutput payloadOut;
 
-        internal IndexOutput SKIP_OUT; // LUCENENET TODO: Rename  camelCase
+        internal IndexOutput skipOut;
 
-        internal readonly SepSkipListWriter SKIP_LIST_WRITER; // LUCENENET TODO: Rename  camelCase
+        internal readonly SepSkipListWriter skipListWriter;
 
         /// <summary>
         /// Expert: The fraction of TermDocs entries stored in skip tables,
@@ -64,37 +64,37 @@ namespace Lucene.Net.Codecs.Sep
         /// smaller values result in bigger indexes, less acceleration and more
         /// accelerable cases. More detailed experiments would be useful here. 
         /// </summary>
-        internal readonly int SKIP_INTERVAL; // LUCENENET TODO: Rename  camelCase
+        internal readonly int skipInterval;
 
         internal const int DEFAULT_SKIP_INTERVAL = 16;
 
         /// <summary>
         /// Expert: minimum docFreq to write any skip data at all
         /// </summary>
-        internal readonly int SKIP_MINIMUM; // LUCENENET TODO: Rename  camelCase
+        internal readonly int skipMinimum;
 
         /// <summary>
         /// Expert: The maximum number of skip levels. Smaller values result in 
         /// slightly smaller indexes, but slower skipping in big posting lists.
         /// </summary>
-        internal readonly int MAX_SKIP_LEVELS = 10; // LUCENENET TODO: Rename  camelCase
+        internal readonly int maxSkipLevels = 10;
 
-        internal readonly int TOTAL_NUM_DOCS; // LUCENENET TODO: Rename  camelCase
+        internal readonly int totalNumDocs;
 
-        internal bool STORE_PAYLOADS; // LUCENENET TODO: Rename  camelCase
-        internal IndexOptions INDEX_OPTIONS; // LUCENENET TODO: Rename  camelCase
+        internal bool storePayloads;
+        internal IndexOptions indexOptions; 
 
-        internal FieldInfo FIELD_INFO; // LUCENENET TODO: Rename 
+        internal FieldInfo fieldInfo;
 
-        internal int LAST_PAYLOAD_LENGTH; // LUCENENET TODO: Rename  camelCase
-        internal int LAST_POSITION; // LUCENENET TODO: Rename  camelCase
-        internal long PAYLOAD_START; // LUCENENET TODO: Rename  camelCase
-        internal int LAST_DOC_ID; // LUCENENET TODO: Rename  camelCase
-        internal int DF; // LUCENENET TODO: Rename  camelCase
+        internal int lastPayloadLength;
+        internal int lastPosition;
+        internal long payloadStart;
+        internal int lastDocID;
+        internal int df;
 
-        private SepTermState _lastState;
-        internal long LAST_PAYLOAD_FP; // LUCENENET TODO: Rename  camelCase
-        internal long LAST_SKIP_FP; // LUCENENET TODO: Rename  camelCase
+        private SepTermState lastState;
+        internal long lastPayloadFP;
+        internal long lastSkipFP; 
 
         public SepPostingsWriter(SegmentWriteState state, IntStreamFactory factory)
             : this(state, factory, DEFAULT_SKIP_INTERVAL)
@@ -103,46 +103,46 @@ namespace Lucene.Net.Codecs.Sep
 
         public SepPostingsWriter(SegmentWriteState state, IntStreamFactory factory, int skipInterval)
         {
-            FREQ_OUT = null;
-            FREQ_INDEX = null;
-            POS_OUT = null;
-            POS_INDEX = null;
-            PAYLOAD_OUT = null;
+            freqOut = null;
+            freqIndex = null;
+            posOut = null;
+            posIndex = null;
+            payloadOut = null;
             var success = false;
             try
             {
-                SKIP_INTERVAL = skipInterval;
-                SKIP_MINIMUM = skipInterval; // set to the same for now
+                this.skipInterval = skipInterval;
+                skipMinimum = skipInterval; // set to the same for now
                 var docFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, DOC_EXTENSION);
 
-                DOC_OUT = factory.CreateOutput(state.Directory, docFileName, state.Context);
-                DOC_INDEX = DOC_OUT.Index();
+                docOut = factory.CreateOutput(state.Directory, docFileName, state.Context);
+                docIndex = docOut.Index();
 
                 if (state.FieldInfos.HasFreq)
                 {
                     var frqFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, FREQ_EXTENSION);
-                    FREQ_OUT = factory.CreateOutput(state.Directory, frqFileName, state.Context);
-                    FREQ_INDEX = FREQ_OUT.Index();
+                    freqOut = factory.CreateOutput(state.Directory, frqFileName, state.Context);
+                    freqIndex = freqOut.Index();
                 }
 
                 if (state.FieldInfos.HasProx)
                 {
                     var posFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, POS_EXTENSION);
-                    POS_OUT = factory.CreateOutput(state.Directory, posFileName, state.Context);
-                    POS_INDEX = POS_OUT.Index();
+                    posOut = factory.CreateOutput(state.Directory, posFileName, state.Context);
+                    posIndex = posOut.Index();
 
                     // TODO: -- only if at least one field stores payloads?
                     var payloadFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,PAYLOAD_EXTENSION);
-                    PAYLOAD_OUT = state.Directory.CreateOutput(payloadFileName, state.Context);
+                    payloadOut = state.Directory.CreateOutput(payloadFileName, state.Context);
                 }
 
                 var skipFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, SKIP_EXTENSION);
-                SKIP_OUT = state.Directory.CreateOutput(skipFileName, state.Context);
+                skipOut = state.Directory.CreateOutput(skipFileName, state.Context);
 
-                TOTAL_NUM_DOCS = state.SegmentInfo.DocCount;
+                totalNumDocs = state.SegmentInfo.DocCount;
 
-                SKIP_LIST_WRITER = new SepSkipListWriter(skipInterval, MAX_SKIP_LEVELS, TOTAL_NUM_DOCS, FREQ_OUT, DOC_OUT,
-                    POS_OUT, PAYLOAD_OUT);
+                skipListWriter = new SepSkipListWriter(skipInterval, maxSkipLevels, totalNumDocs, freqOut, docOut,
+                    posOut, payloadOut);
 
                 success = true;
             }
@@ -150,7 +150,7 @@ namespace Lucene.Net.Codecs.Sep
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(DOC_OUT, SKIP_OUT, FREQ_OUT, POS_OUT, PAYLOAD_OUT);
+                    IOUtils.CloseWhileHandlingException(docOut, skipOut, freqOut, posOut, payloadOut);
                 }
             }
         }
@@ -158,9 +158,9 @@ namespace Lucene.Net.Codecs.Sep
         {
             CodecUtil.WriteHeader(termsOut, CODEC, VERSION_CURRENT);
             // TODO: -- just ask skipper to "start" here
-            termsOut.WriteInt(SKIP_INTERVAL);    // write skipInterval
-            termsOut.WriteInt(MAX_SKIP_LEVELS);   // write maxSkipLevels
-            termsOut.WriteInt(SKIP_MINIMUM);     // write skipMinimum
+            termsOut.WriteInt(skipInterval);    // write skipInterval
+            termsOut.WriteInt(maxSkipLevels);   // write maxSkipLevels
+            termsOut.WriteInt(skipMinimum);     // write skipMinimum
         }
 
         public override BlockTermState NewTermState()
@@ -170,54 +170,54 @@ namespace Lucene.Net.Codecs.Sep
 
         public override void StartTerm()
         {
-            DOC_INDEX.Mark();
+            docIndex.Mark();
             
-            if (INDEX_OPTIONS != IndexOptions.DOCS_ONLY)
+            if (indexOptions != IndexOptions.DOCS_ONLY)
             {
-                FREQ_INDEX.Mark();
+                freqIndex.Mark();
             }
 
-            if (INDEX_OPTIONS == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
+            if (indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
             {
-                POS_INDEX.Mark();
-                PAYLOAD_START = PAYLOAD_OUT.FilePointer;
-                LAST_PAYLOAD_LENGTH = -1;
+                posIndex.Mark();
+                payloadStart = payloadOut.FilePointer;
+                lastPayloadLength = -1;
             }
 
-            SKIP_LIST_WRITER.ResetSkip(DOC_INDEX, FREQ_INDEX, POS_INDEX);
+            skipListWriter.ResetSkip(docIndex, freqIndex, posIndex);
         }
 
         // Currently, this instance is re-used across fields, so
         // our parent calls setField whenever the field changes
         public override int SetField(FieldInfo fi)
         {
-            FIELD_INFO = fi;
+            fieldInfo = fi;
             
-            if (FIELD_INFO.IndexOptions.HasValue)
-                INDEX_OPTIONS = FIELD_INFO.IndexOptions.Value;
+            if (fieldInfo.IndexOptions.HasValue)
+                indexOptions = fieldInfo.IndexOptions.Value;
 
-            if (INDEX_OPTIONS >= IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS)
+            if (indexOptions >= IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS)
             {
                 throw new System.NotSupportedException("this codec cannot index offsets");
             }
-            SKIP_LIST_WRITER.IndexOptions = INDEX_OPTIONS;
-            STORE_PAYLOADS = INDEX_OPTIONS == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS &&
-                            FIELD_INFO.HasPayloads;
-            LAST_PAYLOAD_FP = 0;
-            LAST_SKIP_FP = 0;
-            _lastState = SetEmptyState();
+            skipListWriter.IndexOptions = indexOptions;
+            storePayloads = indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS &&
+                            fieldInfo.HasPayloads;
+            lastPayloadFP = 0;
+            lastSkipFP = 0;
+            lastState = SetEmptyState();
             return 0;
         }
 
         private SepTermState SetEmptyState()
         {
-            var emptyState = new SepTermState {DocIndex = DOC_OUT.Index()};
-            if (INDEX_OPTIONS != IndexOptions.DOCS_ONLY)
+            var emptyState = new SepTermState {DocIndex = docOut.Index()};
+            if (indexOptions != IndexOptions.DOCS_ONLY)
             {
-                emptyState.FreqIndex = FREQ_OUT.Index();
-                if (INDEX_OPTIONS == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
+                emptyState.FreqIndex = freqOut.Index();
+                if (indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
                 {
-                    emptyState.PosIndex = POS_OUT.Index();
+                    emptyState.PosIndex = posOut.Index();
                 }
             }
             emptyState.PayloadFp = 0;
@@ -231,27 +231,27 @@ namespace Lucene.Net.Codecs.Sep
         /// </summary>
         public override void StartDoc(int docId, int termDocFreq)
         {
-            var delta = docId - LAST_DOC_ID;
+            var delta = docId - lastDocID;
             
-            if (docId < 0 || (DF > 0 && delta <= 0))
+            if (docId < 0 || (df > 0 && delta <= 0))
             {
-                throw new CorruptIndexException("docs out of order (" + docId + " <= " + LAST_DOC_ID + " ) (docOut: " +
-                                                DOC_OUT + ")");
+                throw new CorruptIndexException("docs out of order (" + docId + " <= " + lastDocID + " ) (docOut: " +
+                                                docOut + ")");
             }
 
-            if ((++DF%SKIP_INTERVAL) == 0)
+            if ((++df%skipInterval) == 0)
             {
                 // TODO: -- awkward we have to make these two separate calls to skipper
-                SKIP_LIST_WRITER.SetSkipData(LAST_DOC_ID, STORE_PAYLOADS, LAST_PAYLOAD_LENGTH);
-                SKIP_LIST_WRITER.BufferSkip(DF);
+                skipListWriter.SetSkipData(lastDocID, storePayloads, lastPayloadLength);
+                skipListWriter.BufferSkip(df);
             }
 
-            LAST_DOC_ID = docId;
-            DOC_OUT.Write(delta);
-            if (INDEX_OPTIONS != IndexOptions.DOCS_ONLY)
+            lastDocID = docId;
+            docOut.Write(delta);
+            if (indexOptions != IndexOptions.DOCS_ONLY)
             {
                 //System.out.println("    sepw startDoc: write freq=" + termDocFreq);
-                FREQ_OUT.Write(termDocFreq);
+                freqOut.Write(termDocFreq);
             }
         }
 
@@ -259,45 +259,45 @@ namespace Lucene.Net.Codecs.Sep
         /// Add a new position & payload </summary>
         public override void AddPosition(int position, BytesRef payload, int startOffset, int endOffset)
         {
-            Debug.Assert(INDEX_OPTIONS == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
-            int delta = position - LAST_POSITION;
-            Debug.Assert(delta >= 0, "position=" + position + " lastPosition=" + LAST_POSITION);
+            Debug.Assert(indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
+            int delta = position - lastPosition;
+            Debug.Assert(delta >= 0, "position=" + position + " lastPosition=" + lastPosition);
             // not quite right (if pos=0 is repeated twice we don't catch it)
-            LAST_POSITION = position;
+            lastPosition = position;
 
-            if (STORE_PAYLOADS)
+            if (storePayloads)
             {
                 int payloadLength = payload == null ? 0 : payload.Length;
-                if (payloadLength != LAST_PAYLOAD_LENGTH)
+                if (payloadLength != lastPayloadLength)
                 {
-                    LAST_PAYLOAD_LENGTH = payloadLength;
+                    lastPayloadLength = payloadLength;
                     // TODO: explore whether we get better compression
                     // by not storing payloadLength into prox stream?
-                    POS_OUT.Write((delta << 1) | 1);
-                    POS_OUT.Write(payloadLength);
+                    posOut.Write((delta << 1) | 1);
+                    posOut.Write(payloadLength);
                 }
                 else
                 {
-                    POS_OUT.Write(delta << 1);
+                    posOut.Write(delta << 1);
                 }
 
                 if (payloadLength > 0 && payload != null)
                 {
-                    PAYLOAD_OUT.WriteBytes(payload.Bytes, payload.Offset, payloadLength);
+                    payloadOut.WriteBytes(payload.Bytes, payload.Offset, payloadLength);
                 }
             }
             else
             {
-                POS_OUT.Write(delta);
+                posOut.Write(delta);
             }
 
-            LAST_POSITION = position;
+            lastPosition = position;
         }
 
         /// <summary>Called when we are done adding positions & payloads </summary>
         public override void FinishDoc()
         {
-            LAST_POSITION = 0;
+            lastPosition = 0;
         }
 
         private class SepTermState : BlockTermState
@@ -315,18 +315,18 @@ namespace Lucene.Net.Codecs.Sep
             var state = (SepTermState)bstate;
             // TODO: -- wasteful we are counting this in two places?
             Debug.Assert(state.DocFreq > 0);
-            Debug.Assert(state.DocFreq == DF);
+            Debug.Assert(state.DocFreq == df);
 
-            state.DocIndex = DOC_OUT.Index();
-            state.DocIndex.CopyFrom(DOC_INDEX, false);
-            if (INDEX_OPTIONS != IndexOptions.DOCS_ONLY)
+            state.DocIndex = docOut.Index();
+            state.DocIndex.CopyFrom(docIndex, false);
+            if (indexOptions != IndexOptions.DOCS_ONLY)
             {
-                state.FreqIndex = FREQ_OUT.Index();
-                state.FreqIndex.CopyFrom(FREQ_INDEX, false);
-                if (INDEX_OPTIONS == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
+                state.FreqIndex = freqOut.Index();
+                state.FreqIndex.CopyFrom(freqIndex, false);
+                if (indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
                 {
-                    state.PosIndex = POS_OUT.Index();
-                    state.PosIndex.CopyFrom(POS_INDEX, false);
+                    state.PosIndex = posOut.Index();
+                    state.PosIndex.CopyFrom(posIndex, false);
                 }
                 else
                 {
@@ -339,19 +339,19 @@ namespace Lucene.Net.Codecs.Sep
                 state.PosIndex = null;
             }
 
-            if (DF >= SKIP_MINIMUM)
+            if (df >= skipMinimum)
             {
-                state.SkipFp = SKIP_OUT.FilePointer;
-                SKIP_LIST_WRITER.WriteSkip(SKIP_OUT);
+                state.SkipFp = skipOut.FilePointer;
+                skipListWriter.WriteSkip(skipOut);
             }
             else
             {
                 state.SkipFp = -1;
             }
-            state.PayloadFp = PAYLOAD_START;
+            state.PayloadFp = payloadStart;
 
-            LAST_DOC_ID = 0;
-            DF = 0;
+            lastDocID = 0;
+            df = 0;
         }
 
         public override void EncodeTerm(long[] longs, DataOutput output, FieldInfo fi, BlockTermState bstate, bool absolute)
@@ -359,21 +359,21 @@ namespace Lucene.Net.Codecs.Sep
             var state = (SepTermState) bstate;
             if (absolute)
             {
-                LAST_SKIP_FP = 0;
-                LAST_PAYLOAD_FP = 0;
-                _lastState = state;
+                lastSkipFP = 0;
+                lastPayloadFP = 0;
+                lastState = state;
             }
-            _lastState.DocIndex.CopyFrom(state.DocIndex, false);
-            _lastState.DocIndex.Write(output, absolute);
-            if (INDEX_OPTIONS != IndexOptions.DOCS_ONLY)
+            lastState.DocIndex.CopyFrom(state.DocIndex, false);
+            lastState.DocIndex.Write(output, absolute);
+            if (indexOptions != IndexOptions.DOCS_ONLY)
             {
-                _lastState.FreqIndex.CopyFrom(state.FreqIndex, false);
-                _lastState.FreqIndex.Write(output, absolute);
-                if (INDEX_OPTIONS == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
+                lastState.FreqIndex.CopyFrom(state.FreqIndex, false);
+                lastState.FreqIndex.Write(output, absolute);
+                if (indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
                 {
-                    _lastState.PosIndex.CopyFrom(state.PosIndex, false);
-                    _lastState.PosIndex.Write(output, absolute);
-                    if (STORE_PAYLOADS)
+                    lastState.PosIndex.CopyFrom(state.PosIndex, false);
+                    lastState.PosIndex.Write(output, absolute);
+                    if (storePayloads)
                     {
                         if (absolute)
                         {
@@ -381,9 +381,9 @@ namespace Lucene.Net.Codecs.Sep
                         }
                         else
                         {
-                            output.WriteVLong(state.PayloadFp - LAST_PAYLOAD_FP);
+                            output.WriteVLong(state.PayloadFp - lastPayloadFP);
                         }
-                        LAST_PAYLOAD_FP = state.PayloadFp;
+                        lastPayloadFP = state.PayloadFp;
                     }
                 }
             }
@@ -395,16 +395,16 @@ namespace Lucene.Net.Codecs.Sep
             }
             else
             {
-                output.WriteVLong(state.SkipFp - LAST_SKIP_FP);
+                output.WriteVLong(state.SkipFp - lastSkipFP);
             }
-            LAST_SKIP_FP = state.SkipFp;
+            lastSkipFP = state.SkipFp;
         }
 
         protected override void Dispose(bool disposing)
         {
             if (!disposing) return;
 
-            IOUtils.Close(DOC_OUT, SKIP_OUT, FREQ_OUT, POS_OUT, PAYLOAD_OUT);
+            IOUtils.Close(docOut, skipOut, freqOut, posOut, payloadOut);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f50b0355/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
index cdea8dc..027f436 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
@@ -56,33 +56,33 @@ namespace Lucene.Net.Codecs.SimpleText
             public long NumValues { get; set; }
         }
 
-        private readonly int MAX_DOC; // LUCENENET TODO: Rename camelCase
-        private readonly IndexInput DATA; // LUCENENET TODO: Rename camelCase
-        private readonly BytesRef SCRATCH = new BytesRef(); // LUCENENET TODO: Rename camelCase
-        private readonly IDictionary<string, OneField> FIELDS = new Dictionary<string, OneField>(); // LUCENENET TODO: Rename camelCase
+        private readonly int maxDoc;
+        private readonly IndexInput data;
+        private readonly BytesRef scratch = new BytesRef();
+        private readonly IDictionary<string, OneField> fields = new Dictionary<string, OneField>();
 
         // LUCENENET NOTE: Changed from public to internal because the class had to be made public, but is not for public use.
         internal SimpleTextDocValuesReader(SegmentReadState state, string ext)
         {
-            DATA = state.Directory.OpenInput(
+            data = state.Directory.OpenInput(
                     IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, ext), state.Context);
-            MAX_DOC = state.SegmentInfo.DocCount;
+            maxDoc = state.SegmentInfo.DocCount;
             
             while (true)
             {
                 ReadLine();
-                if (SCRATCH.Equals(SimpleTextDocValuesWriter.END))
+                if (scratch.Equals(SimpleTextDocValuesWriter.END))
                 {
                     break;
                 }
-                Debug.Assert(StartsWith(SimpleTextDocValuesWriter.FIELD), SCRATCH.Utf8ToString());
+                Debug.Assert(StartsWith(SimpleTextDocValuesWriter.FIELD), scratch.Utf8ToString());
                 var fieldName = StripPrefix(SimpleTextDocValuesWriter.FIELD);
                 var field = new OneField();
                 
-                FIELDS[fieldName] = field;
+                fields[fieldName] = field;
 
                 ReadLine();
-                Debug.Assert(StartsWith(SimpleTextDocValuesWriter.TYPE), SCRATCH.Utf8ToString());
+                Debug.Assert(StartsWith(SimpleTextDocValuesWriter.TYPE), scratch.Utf8ToString());
 
                 var dvType =
                     (DocValuesType)
@@ -92,13 +92,13 @@ namespace Lucene.Net.Codecs.SimpleText
                 {
                     ReadLine();
                     Debug.Assert(StartsWith(SimpleTextDocValuesWriter.MINVALUE),
-                        "got " + SCRATCH.Utf8ToString() + " field=" + fieldName + " ext=" + ext);
+                        "got " + scratch.Utf8ToString() + " field=" + fieldName + " ext=" + ext);
                     field.MinValue = Convert.ToInt64(StripPrefix(SimpleTextDocValuesWriter.MINVALUE));
                     ReadLine();
                     Debug.Assert(StartsWith(SimpleTextDocValuesWriter.PATTERN));
                     field.Pattern = StripPrefix(SimpleTextDocValuesWriter.PATTERN);
-                    field.DataStartFilePointer = DATA.FilePointer;
-                    DATA.Seek(DATA.FilePointer + (1 + field.Pattern.Length + 2)*MAX_DOC);
+                    field.DataStartFilePointer = data.FilePointer;
+                    data.Seek(data.FilePointer + (1 + field.Pattern.Length + 2)*maxDoc);
                 }
                 else if (dvType == DocValuesType.BINARY)
                 {
@@ -108,8 +108,8 @@ namespace Lucene.Net.Codecs.SimpleText
                     ReadLine();
                     Debug.Assert(StartsWith(SimpleTextDocValuesWriter.PATTERN));
                     field.Pattern = StripPrefix(SimpleTextDocValuesWriter.PATTERN);
-                    field.DataStartFilePointer = DATA.FilePointer;
-                    DATA.Seek(DATA.FilePointer + (9 + field.Pattern.Length + field.MaxLength + 2)*MAX_DOC);
+                    field.DataStartFilePointer = data.FilePointer;
+                    data.Seek(data.FilePointer + (9 + field.Pattern.Length + field.MaxLength + 2)*maxDoc);
                 }
                 else if (dvType == DocValuesType.SORTED || dvType == DocValuesType.SORTED_SET)
                 {
@@ -125,9 +125,9 @@ namespace Lucene.Net.Codecs.SimpleText
                     ReadLine();
                     Debug.Assert(StartsWith(SimpleTextDocValuesWriter.ORDPATTERN));
                     field.OrdPattern = StripPrefix(SimpleTextDocValuesWriter.ORDPATTERN);
-                    field.DataStartFilePointer = DATA.FilePointer;
-                    DATA.Seek(DATA.FilePointer + (9 + field.Pattern.Length + field.MaxLength)*field.NumValues +
-                              (1 + field.OrdPattern.Length)*MAX_DOC);
+                    field.DataStartFilePointer = data.FilePointer;
+                    data.Seek(data.FilePointer + (9 + field.Pattern.Length + field.MaxLength)*field.NumValues +
+                              (1 + field.OrdPattern.Length)*maxDoc);
                 }
                 else
                 {
@@ -137,18 +137,18 @@ namespace Lucene.Net.Codecs.SimpleText
 
             // We should only be called from above if at least one
             // field has DVs:
-            Debug.Assert(FIELDS.Count > 0);
+            Debug.Assert(fields.Count > 0);
         }
 
         public override NumericDocValues GetNumeric(FieldInfo fieldInfo)
         {
-            var field = FIELDS[fieldInfo.Name];
+            var field = fields[fieldInfo.Name];
             Debug.Assert(field != null);
 
             // SegmentCoreReaders already verifies this field is valid:
-            Debug.Assert(field != null, "field=" + fieldInfo.Name + " fields=" + FIELDS);
+            Debug.Assert(field != null, "field=" + fieldInfo.Name + " fields=" + fields);
 
-            var @in = (IndexInput)DATA.Clone();
+            var @in = (IndexInput)data.Clone();
             var scratch = new BytesRef();
             
             return new NumericDocValuesAnonymousInnerClassHelper(this, field, @in, scratch);
@@ -173,8 +173,8 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override long Get(int docId)
             {
-                if (docId < 0 || docId >= _outerInstance.MAX_DOC)
-                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.MAX_DOC - 1) +
+                if (docId < 0 || docId >= _outerInstance.maxDoc)
+                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.maxDoc - 1) +
                                                        "; got " + docId);
 
                 _input.Seek(_field.DataStartFilePointer + (1 + _field.Pattern.Length + 2) * docId);
@@ -199,8 +199,8 @@ namespace Lucene.Net.Codecs.SimpleText
 
         private IBits GetNumericDocsWithField(FieldInfo fieldInfo)
         {
-            var field = FIELDS[fieldInfo.Name];
-            var input = (IndexInput)DATA.Clone();
+            var field = fields[fieldInfo.Name];
+            var input = (IndexInput)data.Clone();
             var scratch = new BytesRef();
             return new BitsAnonymousInnerClassHelper(this, field, input, scratch);
         }
@@ -232,15 +232,15 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public int Length
             {
-                get { return _outerInstance.MAX_DOC; }
+                get { return _outerInstance.maxDoc; }
             }
         }
 
         public override BinaryDocValues GetBinary(FieldInfo fieldInfo)
         {
-            var field = FIELDS[fieldInfo.Name];
+            var field = fields[fieldInfo.Name];
             Debug.Assert(field != null);
-            var input = (IndexInput)DATA.Clone();
+            var input = (IndexInput)data.Clone();
             var scratch = new BytesRef();
 
             return new BinaryDocValuesAnonymousInnerClassHelper(this, field, input, scratch);
@@ -265,8 +265,8 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override void Get(int docId, BytesRef result)
             {
-                if (docId < 0 || docId >= _outerInstance.MAX_DOC)
-                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.MAX_DOC - 1) +
+                if (docId < 0 || docId >= _outerInstance.maxDoc)
+                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.maxDoc - 1) +
                                                        "; got " + docId);
 
                 _input.Seek(_field.DataStartFilePointer + (9 + _field.Pattern.Length + _field.MaxLength + 2) * docId);
@@ -293,8 +293,8 @@ namespace Lucene.Net.Codecs.SimpleText
 
         private IBits GetBinaryDocsWithField(FieldInfo fieldInfo)
         {
-            var field = FIELDS[fieldInfo.Name];
-            var input = (IndexInput)DATA.Clone();
+            var field = fields[fieldInfo.Name];
+            var input = (IndexInput)data.Clone();
             var scratch = new BytesRef();
 
             return new BitsAnonymousInnerClassHelper2(this, field, input, scratch);
@@ -343,17 +343,17 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public int Length
             {
-                get { return _outerInstance.MAX_DOC; }
+                get { return _outerInstance.maxDoc; }
             }
         }
 
         public override SortedDocValues GetSorted(FieldInfo fieldInfo)
         {
-            var field = FIELDS[fieldInfo.Name];
+            var field = fields[fieldInfo.Name];
 
             // SegmentCoreReaders already verifies this field is valid:
             Debug.Assert(field != null);
-            var input = (IndexInput)DATA.Clone();
+            var input = (IndexInput)data.Clone();
             var scratch = new BytesRef();
 
             return new SortedDocValuesAnonymousInnerClassHelper(this, field, input, scratch);
@@ -382,9 +382,9 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override int GetOrd(int docId)
             {
-                if (docId < 0 || docId >= _outerInstance.MAX_DOC)
+                if (docId < 0 || docId >= _outerInstance.maxDoc)
                 {
-                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.MAX_DOC - 1) + "; got " +
+                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.maxDoc - 1) + "; got " +
                                                        docId);
                 }
 
@@ -442,13 +442,13 @@ namespace Lucene.Net.Codecs.SimpleText
 
         public override SortedSetDocValues GetSortedSet(FieldInfo fieldInfo)
         {
-            var field = FIELDS[fieldInfo.Name];
+            var field = fields[fieldInfo.Name];
 
             // SegmentCoreReaders already verifies this field is
             // valid:
             Debug.Assert(field != null);
 
-            var input = (IndexInput) DATA.Clone();
+            var input = (IndexInput) data.Clone();
             var scratch = new BytesRef();
             
             return new SortedSetDocValuesAnonymousInnerClassHelper(this, field, input, scratch);
@@ -485,8 +485,8 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override void SetDocument(int docID)
             {
-                if (docID < 0 || docID >= _outerInstance.MAX_DOC)
-                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.MAX_DOC - 1) + "; got " +
+                if (docID < 0 || docID >= _outerInstance.maxDoc)
+                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.maxDoc - 1) + "; got " +
                                                         docID);
 
 
@@ -539,9 +539,9 @@ namespace Lucene.Net.Codecs.SimpleText
             switch (field.DocValuesType)
             {
                 case DocValuesType.SORTED_SET:
-                    return DocValues.DocsWithValue(GetSortedSet(field), MAX_DOC);
+                    return DocValues.DocsWithValue(GetSortedSet(field), maxDoc);
                 case DocValuesType.SORTED:
-                    return DocValues.DocsWithValue(GetSorted(field), MAX_DOC);
+                    return DocValues.DocsWithValue(GetSorted(field), maxDoc);
                 case DocValuesType.BINARY:
                     return GetBinaryDocsWithField(field);
                 case DocValuesType.NUMERIC:
@@ -555,25 +555,25 @@ namespace Lucene.Net.Codecs.SimpleText
         {
             if (!disposing) return;
 
-            DATA.Dispose();
+            data.Dispose();
         }
 
         /// <summary> Used only in ctor: </summary>
         private void ReadLine()
         {
-            SimpleTextUtil.ReadLine(DATA, SCRATCH);
+            SimpleTextUtil.ReadLine(data, scratch);
         }
 
         /// <summary> Used only in ctor: </summary>
         private bool StartsWith(BytesRef prefix)
         {
-            return StringHelper.StartsWith(SCRATCH, prefix);
+            return StringHelper.StartsWith(scratch, prefix);
         }
 
         /// <summary> Used only in ctor: </summary>
         private string StripPrefix(BytesRef prefix)
         {
-            return Encoding.UTF8.GetString(SCRATCH.Bytes, SCRATCH.Offset + prefix.Length, SCRATCH.Length - prefix.Length);
+            return Encoding.UTF8.GetString(scratch.Bytes, scratch.Offset + prefix.Length, scratch.Length - prefix.Length);
         }
 
         public override long RamBytesUsed()
@@ -584,7 +584,7 @@ namespace Lucene.Net.Codecs.SimpleText
         public override void CheckIntegrity()
         {
             var iScratch = new BytesRef();
-            var clone = (IndexInput) DATA.Clone();
+            var clone = (IndexInput) data.Clone();
             clone.Seek(0);
             ChecksumIndexInput input = new BufferedChecksumIndexInput(clone);
             while (true)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f50b0355/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
index 9e3b829..f856043 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
@@ -63,7 +63,7 @@ namespace Lucene.Net.Codecs.SimpleText
         public override IMutableBits NewLiveDocs(IBits existing)
         {
             var bits = (SimpleTextBits) existing;
-            return new SimpleTextMutableBits(new BitArray(bits.BITS), bits.Length);
+            return new SimpleTextMutableBits(new BitArray(bits.bits), bits.Length);
         }
 
         public override IBits ReadLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context)
@@ -122,7 +122,7 @@ namespace Lucene.Net.Codecs.SimpleText
         public override void WriteLiveDocs(IMutableBits bits, Directory dir, SegmentCommitInfo info, int newDelCount,
             IOContext context)
         {
-            var set = ((SimpleTextBits) bits).BITS;
+            var set = ((SimpleTextBits) bits).bits;
             var size = bits.Length;
             var scratch = new BytesRef();
 
@@ -172,23 +172,23 @@ namespace Lucene.Net.Codecs.SimpleText
         // read-only
         internal class SimpleTextBits : IBits
         {
-            internal readonly BitArray BITS; // LUCENENET TODO: Rename camelCase
-            private readonly int SIZE; // LUCENENET TODO: Rename camelCase
+            internal readonly BitArray bits;
+            private readonly int size;
 
             internal SimpleTextBits(BitArray bits, int size)
             {
-                BITS = bits;
-                SIZE = size;
+                this.bits = bits;
+                this.size = size;
             }
 
             public virtual bool Get(int index)
             {
-                return BITS.SafeGet(index);
+                return bits.SafeGet(index);
             }
 
             public virtual int Length
             {
-                get { return SIZE; }
+                get { return size; }
             }
         }
 
@@ -199,7 +199,7 @@ namespace Lucene.Net.Codecs.SimpleText
             internal SimpleTextMutableBits(int size) 
                 : this(new BitArray(size), size)
             {
-                BITS.Set(0, size);
+                bits.Set(0, size);
             }
 
             internal SimpleTextMutableBits(BitArray bits, int size) 
@@ -209,7 +209,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public virtual void Clear(int bit)
             {
-                BITS.SafeSet(bit, false);
+                bits.SafeSet(bit, false);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f50b0355/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
index 1f901cd..be43312 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextTermVectorsReader.cs
@@ -167,50 +167,50 @@ namespace Lucene.Net.Codecs.SimpleText
                     Array.Copy(_scratch.Bytes, _scratch.Offset + SimpleTextTermVectorsWriter.TERMTEXT.Length, term.Bytes, term.Offset, termLength);
 
                     var postings = new SimpleTVPostings();
-                    terms.TERMS.Add(term, postings);
+                    terms.terms.Add(term, postings);
 
                     ReadLine();
                     Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextTermVectorsWriter.TERMFREQ));
-                    postings.FREQ = ParseIntAt(SimpleTextTermVectorsWriter.TERMFREQ.Length);
+                    postings.freq = ParseIntAt(SimpleTextTermVectorsWriter.TERMFREQ.Length);
 
                     if (!positions && !offsets) continue;
 
                     if (positions)
                     {
-                        postings.POSITIONS = new int[postings.FREQ];
+                        postings.positions = new int[postings.freq];
                         if (payloads)
                         {
-                            postings.PAYLOADS = new BytesRef[postings.FREQ];
+                            postings.payloads = new BytesRef[postings.freq];
                         }
                     }
 
                     if (offsets)
                     {
-                        postings.START_OFFSETS = new int[postings.FREQ];
-                        postings.END_OFFSETS = new int[postings.FREQ];
+                        postings.startOffsets = new int[postings.freq];
+                        postings.endOffsets = new int[postings.freq];
                     }
 
-                    for (var k = 0; k < postings.FREQ; k++)
+                    for (var k = 0; k < postings.freq; k++)
                     {
                         if (positions)
                         {
                             ReadLine();
                             Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextTermVectorsWriter.POSITION));
-                            postings.POSITIONS[k] = ParseIntAt(SimpleTextTermVectorsWriter.POSITION.Length);
+                            postings.positions[k] = ParseIntAt(SimpleTextTermVectorsWriter.POSITION.Length);
                             if (payloads)
                             {
                                 ReadLine();
                                 Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextTermVectorsWriter.PAYLOAD));
                                 if (_scratch.Length - SimpleTextTermVectorsWriter.PAYLOAD.Length == 0)
                                 {
-                                    postings.PAYLOADS[k] = null;
+                                    postings.payloads[k] = null;
                                 }
                                 else
                                 {
                                     var payloadBytes = new byte[_scratch.Length - SimpleTextTermVectorsWriter.PAYLOAD.Length];
                                     Array.Copy(_scratch.Bytes, _scratch.Offset + SimpleTextTermVectorsWriter.PAYLOAD.Length, payloadBytes, 0,
                                         payloadBytes.Length);
-                                    postings.PAYLOADS[k] = new BytesRef(payloadBytes);
+                                    postings.payloads[k] = new BytesRef(payloadBytes);
                                 }
                             }
                         }
@@ -219,11 +219,11 @@ namespace Lucene.Net.Codecs.SimpleText
 
                         ReadLine();
                         Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextTermVectorsWriter.STARTOFFSET));
-                        postings.START_OFFSETS[k] = ParseIntAt(SimpleTextTermVectorsWriter.STARTOFFSET.Length);
+                        postings.startOffsets[k] = ParseIntAt(SimpleTextTermVectorsWriter.STARTOFFSET.Length);
 
                         ReadLine();
                         Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextTermVectorsWriter.ENDOFFSET));
-                        postings.END_OFFSETS[k] = ParseIntAt(SimpleTextTermVectorsWriter.ENDOFFSET.Length);
+                        postings.endOffsets[k] = ParseIntAt(SimpleTextTermVectorsWriter.ENDOFFSET.Length);
                     }
                 }
             }
@@ -300,7 +300,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
         private class SimpleTVTerms : Terms
         {
-            internal readonly SortedDictionary<BytesRef, SimpleTVPostings> TERMS; // LUCENENET TODO: Rename camelCase
+            internal readonly SortedDictionary<BytesRef, SimpleTVPostings> terms;
             private readonly bool _hasOffsetsRenamed;
             private readonly bool _hasPositionsRenamed;
             private readonly bool _hasPayloadsRenamed;
@@ -310,13 +310,13 @@ namespace Lucene.Net.Codecs.SimpleText
                 _hasOffsetsRenamed = hasOffsets;
                 _hasPositionsRenamed = hasPositions;
                 _hasPayloadsRenamed = hasPayloads;
-                TERMS = new SortedDictionary<BytesRef, SimpleTVPostings>();
+                terms = new SortedDictionary<BytesRef, SimpleTVPostings>();
             }
 
             public override TermsEnum GetIterator(TermsEnum reuse)
             {
                 // TODO: reuse
-                return new SimpleTVTermsEnum(TERMS);
+                return new SimpleTVTermsEnum(terms);
             }
 
             public override IComparer<BytesRef> Comparer
@@ -326,7 +326,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override long Count
             {
-                get { return TERMS.Count; }
+                get { return terms.Count; }
             }
 
             public override long SumTotalTermFreq
@@ -336,7 +336,7 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override long SumDocFreq
             {
-                get { return TERMS.Count; }
+                get { return terms.Count; }
             }
 
             public override int DocCount
@@ -367,11 +367,11 @@ namespace Lucene.Net.Codecs.SimpleText
 
         private class SimpleTVPostings
         {
-            internal int FREQ; // LUCENENET TODO: Rename camelCase
-            internal int[] POSITIONS; // LUCENENET TODO: Rename camelCase
-            internal int[] START_OFFSETS; // LUCENENET TODO: Rename camelCase
-            internal int[] END_OFFSETS; // LUCENENET TODO: Rename camelCase
-            internal BytesRef[] PAYLOADS; // LUCENENET TODO: Rename camelCase
+            internal int freq;
+            internal int[] positions;
+            internal int[] startOffsets; 
+            internal int[] endOffsets;
+            internal BytesRef[] payloads;
         }
 
         private class SimpleTVTermsEnum : TermsEnum
@@ -441,26 +441,26 @@ namespace Lucene.Net.Codecs.SimpleText
 
             public override long TotalTermFreq
             {
-                get { return _current.Value.FREQ; }
+                get { return _current.Value.freq; }
             }
 
             public override DocsEnum Docs(IBits liveDocs, DocsEnum reuse, int flags)
             {
                 // TODO: reuse
                 var e = new SimpleTVDocsEnum();
-                e.Reset(liveDocs, (flags & DocsEnum.FLAG_FREQS) == 0 ? 1 : _current.Value.FREQ);
+                e.Reset(liveDocs, (flags & DocsEnum.FLAG_FREQS) == 0 ? 1 : _current.Value.freq);
                 return e;
             }
 
             public override DocsAndPositionsEnum DocsAndPositions(IBits liveDocs, DocsAndPositionsEnum reuse, int flags)
             {
                 var postings = _current.Value;
-                if (postings.POSITIONS == null && postings.START_OFFSETS == null)
+                if (postings.positions == null && postings.startOffsets == null)
                     return null;
 
                 // TODO: reuse
                 var e = new SimpleTVDocsAndPositionsEnum();
-                e.Reset(liveDocs, postings.POSITIONS, postings.START_OFFSETS, postings.END_OFFSETS, postings.PAYLOADS);
+                e.Reset(liveDocs, postings.positions, postings.startOffsets, postings.endOffsets, postings.payloads);
                 return e;
             }
 


[08/37] lucenenet git commit: Lucene.Net.Codecs.Bloom.BloomFilteringPostingsFormat.BloomFilteredTermsEnum refactor: renamed DELEGATE_TERMS_ENUM > delegateTermsEnum, FILTER > filter

Posted by ni...@apache.org.
Lucene.Net.Codecs.Bloom.BloomFilteringPostingsFormat.BloomFilteredTermsEnum refactor: renamed DELEGATE_TERMS_ENUM > delegateTermsEnum, FILTER > filter


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

Branch: refs/heads/api-work
Commit: 20967c4f3320327624caaddf54239362b3db6c63
Parents: 9b5fd73
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 14:38:20 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 14:38:20 2017 +0700

----------------------------------------------------------------------
 .../Bloom/BloomFilteringPostingsFormat.cs           | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/20967c4f/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
index 4be901a..4ee86e6 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -241,8 +241,8 @@ namespace Lucene.Net.Codecs.Bloom
 
                     // We have been handed something we cannot reuse (either null, wrong
                     // class or wrong filter) so allocate a new object
-                    if (bfte.FILTER != _filter) return new BloomFilteredTermsEnum(_delegateTerms, reuse, _filter);
-                    bfte.Reset(_delegateTerms, bfte.DELEGATE_TERMS_ENUM);
+                    if (bfte.filter != _filter) return new BloomFilteredTermsEnum(_delegateTerms, reuse, _filter);
+                    bfte.Reset(_delegateTerms, bfte.delegateTermsEnum);
                     return bfte;
                     
                 }
@@ -296,22 +296,22 @@ namespace Lucene.Net.Codecs.Bloom
             internal sealed class BloomFilteredTermsEnum : TermsEnum
             {
                 private Terms _delegateTerms;
-                internal TermsEnum DELEGATE_TERMS_ENUM;
+                internal TermsEnum delegateTermsEnum;
                 private TermsEnum _reuseDelegate;
-                internal readonly FuzzySet FILTER; // LUCENENET TODO: rename filter
+                internal readonly FuzzySet filter; 
 
                 public BloomFilteredTermsEnum(Terms delegateTerms, TermsEnum reuseDelegate, FuzzySet filter)
                 {
                     _delegateTerms = delegateTerms;
                     _reuseDelegate = reuseDelegate;
-                    this.FILTER = filter;
+                    this.filter = filter;
                 }
 
                 internal void Reset(Terms delegateTerms, TermsEnum reuseDelegate)
                 {
                     _delegateTerms = delegateTerms;
                     _reuseDelegate = reuseDelegate;
-                    DELEGATE_TERMS_ENUM = null;
+                    delegateTermsEnum = null;
                 }
 
                 private TermsEnum Delegate() // LUCENENET TODO: Make property
@@ -320,7 +320,7 @@ namespace Lucene.Net.Codecs.Bloom
                     // this can be a relativly heavy operation depending on the 
                     // delegate postings format and they underlying directory
                     // (clone IndexInput)
-                    return DELEGATE_TERMS_ENUM ?? (DELEGATE_TERMS_ENUM = _delegateTerms.GetIterator(_reuseDelegate));
+                    return delegateTermsEnum ?? (delegateTermsEnum = _delegateTerms.GetIterator(_reuseDelegate));
                 }
 
                 public override sealed BytesRef Next()
@@ -340,7 +340,7 @@ namespace Lucene.Net.Codecs.Bloom
                     // structure
                     // that may occasionally give a false positive but guaranteed no false
                     // negatives
-                    if (FILTER.Contains(text) == FuzzySet.ContainsResult.No)
+                    if (filter.Contains(text) == FuzzySet.ContainsResult.No)
                     {
                         return false;
                     }


[18/37] lucenenet git commit: Lucene.Net.Codecs.Memory.MemoryPostingsFormat refactor: reset() > Reset(), decodeMetaData() > DecodeMetaData()

Posted by ni...@apache.org.
Lucene.Net.Codecs.Memory.MemoryPostingsFormat refactor: reset() > Reset(), decodeMetaData() > DecodeMetaData()


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

Branch: refs/heads/api-work
Commit: b0c227e0e0af312ddca3bef8e040137a6b2267f6
Parents: a1c6d3d
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 16:06:10 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:23 2017 +0700

----------------------------------------------------------------------
 .../Memory/MemoryPostingsFormat.cs                | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b0c227e0/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
index d2aa086..8ae3b2e 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
@@ -229,7 +229,7 @@ namespace Lucene.Net.Codecs.Memory
                 {
                 }
 
-                public virtual PostingsWriter reset() // LUCENENET TODO: Rename Reset()
+                public virtual PostingsWriter Reset()
                 {
                     Debug.Assert(buffer.FilePointer == 0);
                     lastDocID = 0;
@@ -244,7 +244,7 @@ namespace Lucene.Net.Codecs.Memory
 
             public override PostingsConsumer StartTerm(BytesRef text)
             {
-                return postingsWriter.reset();
+                return postingsWriter.Reset();
             }
 
             private readonly RAMOutputStream buffer2 = new RAMOutputStream();
@@ -563,7 +563,7 @@ namespace Lucene.Net.Codecs.Memory
                 return storePayloads == this.storePayloads && storeOffsets == this.storeOffsets;
             }
 
-            public FSTDocsAndPositionsEnum reset(BytesRef bufferIn, IBits liveDocs, int numDocs) // LUCENENET TODO: Rename Reset
+            public FSTDocsAndPositionsEnum Reset(BytesRef bufferIn, IBits liveDocs, int numDocs)
             {
                 Debug.Assert(numDocs > 0);
 
@@ -767,7 +767,7 @@ namespace Lucene.Net.Codecs.Memory
                 fstEnum = new BytesRefFSTEnum<BytesRef>(fst);
             }
 
-            private void decodeMetaData() // LUCENENET TODO: Rename pascal case
+            private void DecodeMetaData()
             {
                 if (!didDecode)
                 {
@@ -830,7 +830,7 @@ namespace Lucene.Net.Codecs.Memory
 
             public override DocsEnum Docs(IBits liveDocs, DocsEnum reuse, int flags)
             {
-                decodeMetaData();
+                DecodeMetaData();
                 FSTDocsEnum docsEnum;
 
                 if (reuse == null || !(reuse is FSTDocsEnum))
@@ -855,7 +855,7 @@ namespace Lucene.Net.Codecs.Memory
                 {
                     return null;
                 }
-                decodeMetaData();
+                DecodeMetaData();
                 FSTDocsAndPositionsEnum docsAndPositionsEnum;
                 if (reuse == null || !(reuse is FSTDocsAndPositionsEnum))
                 {
@@ -870,7 +870,7 @@ namespace Lucene.Net.Codecs.Memory
                     }
                 }
                 //System.out.println("D&P reset this=" + this);
-                return docsAndPositionsEnum.reset(postingsSpare, liveDocs, docFreq_Renamed);
+                return docsAndPositionsEnum.Reset(postingsSpare, liveDocs, docFreq_Renamed);
             }
 
             public override BytesRef Term
@@ -896,7 +896,7 @@ namespace Lucene.Net.Codecs.Memory
             {
                 get
                 {
-                    decodeMetaData();
+                    DecodeMetaData();
                     return docFreq_Renamed;
                 }
             }
@@ -905,7 +905,7 @@ namespace Lucene.Net.Codecs.Memory
             {
                 get
                 {
-                    decodeMetaData();
+                    DecodeMetaData();
                     return totalTermFreq_Renamed;
                 }
             }


[29/37] lucenenet git commit: Lucene.Net.Codecs: Renamed private fields camelCase

Posted by ni...@apache.org.
Lucene.Net.Codecs: Renamed private fields camelCase


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

Branch: refs/heads/api-work
Commit: f46d37290304f5f3e4393c1e40601846fcdfe3cc
Parents: fcb9891
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 17:29:46 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:29:46 2017 +0700

----------------------------------------------------------------------
 .../BlockTerms/BlockTermsWriter.cs              | 26 +++---
 .../BlockTerms/FixedGapTermsIndexReader.cs      | 10 +-
 .../BlockTerms/FixedGapTermsIndexWriter.cs      | 98 ++++++++++----------
 .../BlockTerms/VariableGapTermsIndexReader.cs   | 14 +--
 4 files changed, 74 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f46d3729/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
index 17d0b30..d7d94ce 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
@@ -49,10 +49,10 @@ namespace Lucene.Net.Codecs.BlockTerms
         public const string TERMS_EXTENSION = "tib";
 
         protected IndexOutput _output;
-        private readonly PostingsWriterBase PostingsWriter;
-        private readonly FieldInfos FieldInfos;
-        private FieldInfo CurrentField;
-        private readonly TermsIndexWriterBase _termsIndexWriter;
+        private readonly PostingsWriterBase postingsWriter;
+        private readonly FieldInfos fieldInfos;
+        private FieldInfo currentField;
+        private readonly TermsIndexWriterBase termsIndexWriter;
         
         protected class FieldMetaData
         {
@@ -86,16 +86,16 @@ namespace Lucene.Net.Codecs.BlockTerms
         {
             var termsFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,
                 TERMS_EXTENSION);
-            _termsIndexWriter = termsIndexWriter;
+            this.termsIndexWriter = termsIndexWriter;
             _output = state.Directory.CreateOutput(termsFileName, state.Context);
             var success = false;
 
             try
             {
-                FieldInfos = state.FieldInfos;
+                fieldInfos = state.FieldInfos;
                 WriteHeader(_output);
-                CurrentField = null;
-                PostingsWriter = postingsWriter;
+                currentField = null;
+                this.postingsWriter = postingsWriter;
 
                 postingsWriter.Init(_output); // have consumer write its format/header
                 success = true;
@@ -116,11 +116,11 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         public override TermsConsumer AddField(FieldInfo field)
         {
-            Debug.Assert(CurrentField == null || CurrentField.Name.CompareTo(field.Name) < 0);
+            Debug.Assert(currentField == null || currentField.Name.CompareTo(field.Name) < 0);
 
-            CurrentField = field;
-            var fiw = _termsIndexWriter.AddField(field, _output.FilePointer);
-            return new TermsWriter(this, fiw, field, PostingsWriter);
+            currentField = field;
+            var fiw = termsIndexWriter.AddField(field, _output.FilePointer);
+            return new TermsWriter(this, fiw, field, postingsWriter);
         }
 
         public override void Dispose()
@@ -155,7 +155,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             }
             finally
             {
-                IOUtils.Close(_output, PostingsWriter, _termsIndexWriter);
+                IOUtils.Close(_output, postingsWriter, termsIndexWriter);
                 _output = null;
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f46d3729/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
index 7a1750d..8fa852f 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
@@ -301,7 +301,7 @@ namespace Lucene.Net.Codecs.BlockTerms
         {
             private readonly FixedGapTermsIndexReader outerInstance;
 
-            internal volatile CoreFieldIndex CoreIndex;
+            internal volatile CoreFieldIndex coreIndex;
 
             private readonly long _indexStart;
             private readonly long _termsStart;
@@ -326,8 +326,8 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             private void LoadTermsIndex()
             {
-                if (CoreIndex == null)
-                    CoreIndex = new CoreFieldIndex(_indexStart, _termsStart, _packedIndexStart, _packedOffsetsStart,
+                if (coreIndex == null)
+                    coreIndex = new CoreFieldIndex(_indexStart, _termsStart, _packedIndexStart, _packedOffsetsStart,
                         _numIndexTerms, outerInstance);
             }
 
@@ -485,7 +485,7 @@ namespace Lucene.Net.Codecs.BlockTerms
         public override FieldIndexEnum GetFieldEnum(FieldInfo fieldInfo)
         {
             FieldIndexData fieldData = _fields[fieldInfo];
-            return fieldData.CoreIndex == null ? null : new IndexEnum(fieldData.CoreIndex, this);
+            return fieldData.coreIndex == null ? null : new IndexEnum(fieldData.coreIndex, this);
         }
 
         public override void Dispose()
@@ -519,7 +519,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                                 ((_termBytesReader != null) ? _termBytesReader.RamBytesUsed() : 0);
 
             return _fields.Values.Aggregate(sizeInBytes,
-                (current, entry) => (current + entry.CoreIndex.RamBytesUsed()));
+                (current, entry) => (current + entry.coreIndex.RamBytesUsed()));
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f46d3729/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
index 74ba41d..038e42c 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
@@ -115,115 +115,115 @@ namespace Lucene.Net.Codecs.BlockTerms
         {
             private readonly FixedGapTermsIndexWriter outerInstance;
 
-            internal readonly FieldInfo FieldInfo;
-            internal int NumIndexTerms;
-            internal readonly long IndexStart;
-            internal readonly long TermsStart;
-            internal long PackedIndexStart;
-            internal long PackedOffsetsStart;
-            private long _numTerms;
+            internal readonly FieldInfo fieldInfo;
+            internal int numIndexTerms;
+            internal readonly long indexStart;
+            internal readonly long termsStart;
+            internal long packedIndexStart;
+            internal long packedOffsetsStart;
+            private long numTerms;
 
             // TODO: we could conceivably make a PackedInts wrapper
             // that auto-grows... then we wouldn't force 6 bytes RAM
             // per index term:
-            private short[] _termLengths;
-            private int[] _termsPointerDeltas;
-            private long _lastTermsPointer;
-            private long _totTermLength;
+            private short[] termLengths;
+            private int[] termsPointerDeltas;
+            private long lastTermsPointer;
+            private long totTermLength;
 
-            private readonly BytesRef _lastTerm = new BytesRef();
+            private readonly BytesRef lastTerm = new BytesRef();
 
             internal SimpleFieldWriter(FixedGapTermsIndexWriter outerInstance, FieldInfo fieldInfo, long termsFilePointer)
             {
                 this.outerInstance = outerInstance;
-                FieldInfo = fieldInfo;
-                IndexStart = outerInstance.Output.FilePointer;
-                TermsStart = _lastTermsPointer = termsFilePointer;
-                _termLengths = new short[0];
-                _termsPointerDeltas = new int[0];
+                this.fieldInfo = fieldInfo;
+                indexStart = outerInstance.Output.FilePointer;
+                termsStart = lastTermsPointer = termsFilePointer;
+                termLengths = new short[0];
+                termsPointerDeltas = new int[0];
             }
 
             public override bool CheckIndexTerm(BytesRef text, TermStats stats)
             {
                 // First term is first indexed term:
                 //System.output.println("FGW: checkIndexTerm text=" + text.utf8ToString());
-                if (0 == (_numTerms++ % outerInstance._termIndexInterval))
+                if (0 == (numTerms++ % outerInstance._termIndexInterval))
                     return true;
 
                 // save last term just before next index term so we
                 // can compute wasted suffix
-                if (0 == _numTerms % outerInstance._termIndexInterval)
-                    _lastTerm.CopyBytes(text);
+                if (0 == numTerms % outerInstance._termIndexInterval)
+                    lastTerm.CopyBytes(text);
 
                 return false;
             }
 
             public override void Add(BytesRef text, TermStats stats, long termsFilePointer)
             {
-                int indexedTermLength = outerInstance.IndexedTermPrefixLength(_lastTerm, text);
+                int indexedTermLength = outerInstance.IndexedTermPrefixLength(lastTerm, text);
 
                 // write only the min prefix that shows the diff
                 // against prior term
                 outerInstance.Output.WriteBytes(text.Bytes, text.Offset, indexedTermLength);
 
-                if (_termLengths.Length == NumIndexTerms)
+                if (termLengths.Length == numIndexTerms)
                 {
-                    _termLengths = ArrayUtil.Grow(_termLengths);
+                    termLengths = ArrayUtil.Grow(termLengths);
                 }
-                if (_termsPointerDeltas.Length == NumIndexTerms)
+                if (termsPointerDeltas.Length == numIndexTerms)
                 {
-                    _termsPointerDeltas = ArrayUtil.Grow(_termsPointerDeltas);
+                    termsPointerDeltas = ArrayUtil.Grow(termsPointerDeltas);
                 }
 
                 // save delta terms pointer
-                _termsPointerDeltas[NumIndexTerms] = (int)(termsFilePointer - _lastTermsPointer);
-                _lastTermsPointer = termsFilePointer;
+                termsPointerDeltas[numIndexTerms] = (int)(termsFilePointer - lastTermsPointer);
+                lastTermsPointer = termsFilePointer;
 
                 // save term length (in bytes)
                 Debug.Assert(indexedTermLength <= short.MaxValue);
-                _termLengths[NumIndexTerms] = (short)indexedTermLength;
-                _totTermLength += indexedTermLength;
+                termLengths[numIndexTerms] = (short)indexedTermLength;
+                totTermLength += indexedTermLength;
 
-                _lastTerm.CopyBytes(text);
-                NumIndexTerms++;
+                lastTerm.CopyBytes(text);
+                numIndexTerms++;
             }
 
             public override void Finish(long termsFilePointer)
             {
                 // write primary terms dict offsets
-                PackedIndexStart = outerInstance.Output.FilePointer;
+                packedIndexStart = outerInstance.Output.FilePointer;
 
-                PackedInts.Writer w = PackedInts.GetWriter(outerInstance.Output, NumIndexTerms,
+                PackedInts.Writer w = PackedInts.GetWriter(outerInstance.Output, numIndexTerms,
                     PackedInts.BitsRequired(termsFilePointer),
                     PackedInts.DEFAULT);
 
                 // relative to our indexStart
                 long upto = 0;
-                for (int i = 0; i < NumIndexTerms; i++)
+                for (int i = 0; i < numIndexTerms; i++)
                 {
-                    upto += _termsPointerDeltas[i];
+                    upto += termsPointerDeltas[i];
                     w.Add(upto);
                 }
                 w.Finish();
 
-                PackedOffsetsStart = outerInstance.Output.FilePointer;
+                packedOffsetsStart = outerInstance.Output.FilePointer;
 
                 // write offsets into the byte[] terms
-                w = PackedInts.GetWriter(outerInstance.Output, 1 + NumIndexTerms, PackedInts.BitsRequired(_totTermLength),
+                w = PackedInts.GetWriter(outerInstance.Output, 1 + numIndexTerms, PackedInts.BitsRequired(totTermLength),
                     PackedInts.DEFAULT);
                 upto = 0;
-                for (int i = 0; i < NumIndexTerms; i++)
+                for (int i = 0; i < numIndexTerms; i++)
                 {
                     w.Add(upto);
-                    upto += _termLengths[i];
+                    upto += termLengths[i];
                 }
                 w.Add(upto);
                 w.Finish();
 
                 // our referrer holds onto us, while other fields are
                 // being written, so don't tie up this RAM:
-                _termLengths = null;
-                _termsPointerDeltas = null;
+                termLengths = null;
+                termsPointerDeltas = null;
             }
         }
 
@@ -241,7 +241,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     for (int i = 0; i < fieldCount; i++)
                     {
                         SimpleFieldWriter field = _fields[i];
-                        if (field.NumIndexTerms > 0)
+                        if (field.numIndexTerms > 0)
                         {
                             nonNullFieldCount++;
                         }
@@ -251,14 +251,14 @@ namespace Lucene.Net.Codecs.BlockTerms
                     for (int i = 0; i < fieldCount; i++)
                     {
                         SimpleFieldWriter field = _fields[i];
-                        if (field.NumIndexTerms > 0)
+                        if (field.numIndexTerms > 0)
                         {
-                            Output.WriteVInt(field.FieldInfo.Number);
-                            Output.WriteVInt(field.NumIndexTerms);
-                            Output.WriteVLong(field.TermsStart);
-                            Output.WriteVLong(field.IndexStart);
-                            Output.WriteVLong(field.PackedIndexStart);
-                            Output.WriteVLong(field.PackedOffsetsStart);
+                            Output.WriteVInt(field.fieldInfo.Number);
+                            Output.WriteVInt(field.numIndexTerms);
+                            Output.WriteVLong(field.termsStart);
+                            Output.WriteVLong(field.indexStart);
+                            Output.WriteVLong(field.packedIndexStart);
+                            Output.WriteVLong(field.packedOffsetsStart);
                         }
                     }
                     WriteTrailer(dirStart);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f46d3729/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
index 227c37b..35b0dc4 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
@@ -177,7 +177,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             private readonly long _indexStart;
             // Set only if terms index is loaded:
-            internal volatile FST<long?> Fst;
+            internal volatile FST<long?> fst;
             
             public FieldIndexData(VariableGapTermsIndexReader outerInstance, long indexStart)
             {
@@ -190,11 +190,11 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             private void LoadTermsIndex()
             {
-                if (Fst != null) return;
+                if (fst != null) return;
 
                 var clone = (IndexInput)outerInstance._input.Clone();
                 clone.Seek(_indexStart);
-                Fst = new FST<long?>(clone, outerInstance._fstOutputs);
+                fst = new FST<long?>(clone, outerInstance._fstOutputs);
                 clone.Dispose();
 
                 /*
@@ -211,7 +211,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     var scratchIntsRef = new IntsRef();
                     var outputs = PositiveIntOutputs.Singleton;
                     var builder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, outputs);
-                    var fstEnum = new BytesRefFSTEnum<long?>(Fst);
+                    var fstEnum = new BytesRefFSTEnum<long?>(fst);
                     var count = outerInstance._indexDivisor;
 
                     BytesRefFSTEnum.InputOutput<long?> result;
@@ -224,21 +224,21 @@ namespace Lucene.Net.Codecs.BlockTerms
                         }
                         count++;
                     }
-                    Fst = builder.Finish();
+                    fst = builder.Finish();
                 }
             }
 
             /// <summary>Returns approximate RAM bytes used</summary>
             public virtual long RamBytesUsed()
             {
-                return Fst == null ? 0 : Fst.SizeInBytes();
+                return fst == null ? 0 : fst.SizeInBytes();
             }
         }
 
         public override FieldIndexEnum GetFieldEnum(FieldInfo fieldInfo)
         {
             FieldIndexData fieldData = _fields[fieldInfo];
-            return fieldData.Fst == null ? null : new IndexEnum(fieldData.Fst);
+            return fieldData.fst == null ? null : new IndexEnum(fieldData.fst);
         }
 
         public override void Dispose()


[12/37] lucenenet git commit: Lucene.Net.Codecs.IntBlock (FixedIntBlockIndexInput + VariableIntBlockIndexInput) refactor: renamed InputReader > Reader, InputIndex > Index

Posted by ni...@apache.org.
Lucene.Net.Codecs.IntBlock (FixedIntBlockIndexInput + VariableIntBlockIndexInput) refactor: renamed InputReader > Reader, InputIndex > Index


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

Branch: refs/heads/api-work
Commit: 0f32196fe6ea875920eec7603848610e7e356f23
Parents: c4fad82
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 15:06:05 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 15:06:05 2017 +0700

----------------------------------------------------------------------
 .../Intblock/FixedIntBlockIndexInput.cs           | 18 +++++++++---------
 .../Intblock/VariableIntBlockIndexInput.cs        | 18 +++++++++---------
 2 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f32196f/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
index 7c27399..bf269a2 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
@@ -50,7 +50,7 @@ namespace Lucene.Net.Codecs.IntBlock
             var buffer = new int[blockSize];
             var clone = (IndexInput)input.Clone();
             // TODO: can this be simplified?
-            return new InputReader(clone, buffer, GetBlockReader(clone, buffer));
+            return new Reader(clone, buffer, GetBlockReader(clone, buffer));
         }
 
         public override void Dispose()
@@ -60,7 +60,7 @@ namespace Lucene.Net.Codecs.IntBlock
 
         public override AbstractIndex GetIndex()
         {
-            return new InputIndex(this);
+            return new Index(this);
         }
 
         protected abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
@@ -77,7 +77,7 @@ namespace Lucene.Net.Codecs.IntBlock
             void ReadBlock();
         }
 
-        private class InputReader : AbstractReader // LUCENENET TODO: Rename Reader
+        private class Reader : AbstractReader
         {
             private readonly IndexInput input;
             private readonly IBlockReader blockReader;
@@ -89,7 +89,7 @@ namespace Lucene.Net.Codecs.IntBlock
             private long pendingFP;
             private long lastBlockFP = -1;
 
-            public InputReader(IndexInput input, int[] pending, IBlockReader blockReader)
+            public Reader(IndexInput input, int[] pending, IBlockReader blockReader)
             {
                 this.input = input;
                 this.pending = pending;
@@ -130,11 +130,11 @@ namespace Lucene.Net.Codecs.IntBlock
             }
         }
 
-        private class InputIndex : AbstractIndex // LUCENENET TODO: Rename Index
+        private class Index : AbstractIndex
         {
             private readonly FixedIntBlockIndexInput outerInstance;
 
-            public InputIndex(FixedIntBlockIndexInput outerInstance)
+            public Index(FixedIntBlockIndexInput outerInstance)
             {
                 this.outerInstance = outerInstance;
             }
@@ -169,19 +169,19 @@ namespace Lucene.Net.Codecs.IntBlock
 
             public override void Seek(AbstractReader other)
             {
-                ((InputReader)other).Seek(fp, upto);
+                ((Reader)other).Seek(fp, upto);
             }
 
             public override void CopyFrom(AbstractIndex other)
             {
-                InputIndex idx = (InputIndex)other;
+                Index idx = (Index)other;
                 fp = idx.fp;
                 upto = idx.upto;
             }
 
             public override AbstractIndex Clone()
             {
-                InputIndex other = new InputIndex(outerInstance);
+                Index other = new Index(outerInstance);
                 other.fp = fp;
                 other.upto = upto;
                 return other;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f32196f/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
index 93376a2..55e02ba 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
@@ -52,7 +52,7 @@ namespace Lucene.Net.Codecs.IntBlock
             var buffer = new int[maxBlockSize];
             var clone = (IndexInput)input.Clone();
             // TODO: can this be simplified?
-            return new InputReader(clone, buffer, GetBlockReader(clone, buffer));
+            return new Reader(clone, buffer, GetBlockReader(clone, buffer));
         }
 
         public override void Dispose()
@@ -62,7 +62,7 @@ namespace Lucene.Net.Codecs.IntBlock
 
         public override AbstractIndex GetIndex()
         {
-            return new InputIndex(this);
+            return new Index(this);
         }
 
         protected abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
@@ -79,7 +79,7 @@ namespace Lucene.Net.Codecs.IntBlock
             void Seek(long pos);
         }
 
-        private class InputReader : AbstractReader // LUCENENET TODO: Rename Reader
+        private class Reader : AbstractReader
         {
             private readonly IndexInput input;
 
@@ -93,7 +93,7 @@ namespace Lucene.Net.Codecs.IntBlock
             private int blockSize;
             private readonly IBlockReader blockReader;
 
-            public InputReader(IndexInput input, int[] pending, IBlockReader blockReader)
+            public Reader(IndexInput input, int[] pending, IBlockReader blockReader)
             {
                 this.input = input;
                 this.pending = pending;
@@ -155,11 +155,11 @@ namespace Lucene.Net.Codecs.IntBlock
             }
         }
 
-        private class InputIndex : AbstractIndex // LUCENENET TODO: Rename Index
+        private class Index : AbstractIndex
         {
             private readonly VariableIntBlockIndexInput outerInstance;
 
-            public InputIndex(VariableIntBlockIndexInput outerInstance)
+            public Index(VariableIntBlockIndexInput outerInstance)
             {
                 this.outerInstance = outerInstance;
             }
@@ -201,19 +201,19 @@ namespace Lucene.Net.Codecs.IntBlock
 
             public override void Seek(AbstractReader other)
             {
-                ((InputReader)other).Seek(fp, upto);
+                ((Reader)other).Seek(fp, upto);
             }
 
             public override void CopyFrom(AbstractIndex other)
             {
-                InputIndex idx = (InputIndex)other;
+                Index idx = (Index)other;
                 fp = idx.fp;
                 upto = idx.upto;
             }
 
             public override AbstractIndex Clone()
             {
-                InputIndex other = new InputIndex(outerInstance);
+                Index other = new Index(outerInstance);
                 other.fp = fp;
                 other.upto = upto;
                 return other;


[09/37] lucenenet git commit: Lucene.Net.Codecs.Bloom.FuzzySet.ContainsResult refactor > Maybe > MAYBE, No > NO

Posted by ni...@apache.org.
Lucene.Net.Codecs.Bloom.FuzzySet.ContainsResult refactor > Maybe > MAYBE, No > NO


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

Branch: refs/heads/api-work
Commit: 7586bb8ab505ad7da00b5ba6c68057510a8031d1
Parents: 20967c4
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 14:39:43 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 14:39:43 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs | 2 +-
 src/Lucene.Net.Codecs/Bloom/FuzzySet.cs                     | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7586bb8a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
index 4ee86e6..96024a8 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -340,7 +340,7 @@ namespace Lucene.Net.Codecs.Bloom
                     // structure
                     // that may occasionally give a false positive but guaranteed no false
                     // negatives
-                    if (filter.Contains(text) == FuzzySet.ContainsResult.No)
+                    if (filter.Contains(text) == FuzzySet.ContainsResult.NO)
                     {
                         return false;
                     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7586bb8a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs b/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
index 16e1104..d3ac42b 100644
--- a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
+++ b/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
@@ -69,8 +69,8 @@ namespace Lucene.Net.Codecs.Bloom
         /// </remarks>
         public enum ContainsResult
         {
-            Maybe, // LUCENENET TODO: Change to MAYBE, NO
-            No
+            MAYBE,
+            NO
         };
 
         private readonly HashFunction _hashFunction;
@@ -226,7 +226,7 @@ namespace Lucene.Net.Codecs.Bloom
 
             // Bloom sizes are always base 2 and so can be ANDed for a fast modulo
             var pos = positiveHash & _bloomSize;
-            return _filter.Get(pos) ? ContainsResult.Maybe : ContainsResult.No;
+            return _filter.Get(pos) ? ContainsResult.MAYBE : ContainsResult.NO;
         }
 
         /// <summary>


[35/37] lucenenet git commit: Lucene.Net.Codecs: license headers and usings

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs b/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
index 636f0fe..9d7e448 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs
@@ -1,38 +1,37 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Util.Fst;
+using System.Collections.Generic;
+using System.IO;
 
 namespace Lucene.Net.Codecs.Memory
 {
-    using System.Collections.Generic;
-    using System.IO;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using IndexOptions = Index.IndexOptions;
+    using BytesRef = Util.BytesRef;
     using FieldInfo = Index.FieldInfo;
     using FieldInfos = Index.FieldInfos;
+    using FST = Util.Fst.FST;
     using IndexFileNames = Index.IndexFileNames;
-    using SegmentWriteState = Index.SegmentWriteState;
-    using DataOutput = Store.DataOutput;
+    using IndexOptions = Index.IndexOptions;
     using IndexOutput = Store.IndexOutput;
-    using RAMOutputStream = Store.RAMOutputStream;
-    using BytesRef = Util.BytesRef;
-    using IOUtils = Util.IOUtils;
     using IntsRef = Util.IntsRef;
-    using FST = Util.Fst.FST;
-    using Util.Fst;
+    using IOUtils = Util.IOUtils;
+    using RAMOutputStream = Store.RAMOutputStream;
+    using SegmentWriteState = Index.SegmentWriteState;
     using Util = Util.Fst.Util;
 
     /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
index dd51846..ce252f3 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesConsumer.cs
@@ -1,36 +1,35 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Util.Fst;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
 
 namespace Lucene.Net.Codecs.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using Lucene.Net.Util.Fst;
-    using System;
-    using System.Collections;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using System.Linq;
     using ArrayUtil = Util.ArrayUtil;
     using BlockPackedWriter = Util.Packed.BlockPackedWriter;
     using ByteArrayDataOutput = Store.ByteArrayDataOutput;
     using BytesRef = Util.BytesRef;
     using FieldInfo = Index.FieldInfo;
     using FormatAndBits = Util.Packed.PackedInts.FormatAndBits;
-    using FST = Util.Fst.FST;
     using IndexFileNames = Index.IndexFileNames;
     using IndexOutput = Store.IndexOutput;
     using INPUT_TYPE = Util.Fst.FST.INPUT_TYPE;
@@ -43,7 +42,6 @@ namespace Lucene.Net.Codecs.Memory
     using SegmentWriteState = Index.SegmentWriteState;
     using Util = Util.Fst.Util;
 
-
     /// <summary>
     /// Writer for <seealso cref="MemoryDocValuesFormat"/>
     /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
index be8ca94..80a8b34 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesFormat.cs
@@ -1,25 +1,24 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Lucene.Net.Index;
+\ufeffusing Lucene.Net.Index;
 using Lucene.Net.Util.Packed;
 
 namespace Lucene.Net.Codecs.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// In-memory docvalues format </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
index 272fa09..4ff434c 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
@@ -1,34 +1,32 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using Lucene.Net.Codecs.Sep;
-using Lucene.Net.Index;
+\ufeffusing Lucene.Net.Index;
 using Lucene.Net.Store;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using Lucene.Net.Util.Fst;
 using Lucene.Net.Util.Packed;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
 
 namespace Lucene.Net.Codecs.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     using Util = Lucene.Net.Util.Fst.Util;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
index 8ae3b2e..1052816 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
@@ -1,56 +1,53 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+\ufeffusing Lucene.Net.Util.Fst;
 using System;
-using System.Diagnostics;
 using System.Collections.Generic;
-using Lucene.Net.Util.Packed;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
+    using ArrayUtil = Util.ArrayUtil;
+    using ByteArrayDataInput = Store.ByteArrayDataInput;
+    using ByteSequenceOutputs = Util.Fst.ByteSequenceOutputs;
+    using BytesRef = Util.BytesRef;
+    using ChecksumIndexInput = Store.ChecksumIndexInput;
     using DocsAndPositionsEnum = Index.DocsAndPositionsEnum;
     using DocsEnum = Index.DocsEnum;
-    using IndexOptions = Index.IndexOptions;
     using FieldInfo = Index.FieldInfo;
     using FieldInfos = Index.FieldInfos;
+    using FST = Util.Fst.FST;
+    using IBits = Util.IBits;
     using IndexFileNames = Index.IndexFileNames;
-    using SegmentReadState = Index.SegmentReadState;
-    using SegmentWriteState = Index.SegmentWriteState;
-    using Terms = Index.Terms;
-    using TermsEnum = Index.TermsEnum;
-    using ByteArrayDataInput = Store.ByteArrayDataInput;
-    using ChecksumIndexInput = Store.ChecksumIndexInput;
-    using IOContext = Store.IOContext;
     using IndexInput = Store.IndexInput;
+    using IndexOptions = Index.IndexOptions;
     using IndexOutput = Store.IndexOutput;
-    using RAMOutputStream = Store.RAMOutputStream;
-    using ArrayUtil = Util.ArrayUtil;
-    using IBits = Util.IBits;
-    using BytesRef = Util.BytesRef;
-    using IOUtils = Util.IOUtils;
     using IntsRef = Util.IntsRef;
+    using IOContext = Store.IOContext;
+    using IOUtils = Util.IOUtils;
+    using PackedInts = Util.Packed.PackedInts;
+    using RAMOutputStream = Store.RAMOutputStream;
     using RamUsageEstimator = Util.RamUsageEstimator;
-    using ByteSequenceOutputs = Util.Fst.ByteSequenceOutputs;
-    using FST = Util.Fst.FST;
+    using SegmentReadState = Index.SegmentReadState;
+    using SegmentWriteState = Index.SegmentWriteState;
+    using Terms = Index.Terms;
+    using TermsEnum = Index.TermsEnum;
     using Util = Util.Fst.Util;
-    using PackedInts = Util.Packed.PackedInts;
-    using Lucene.Net.Util.Fst;
-
 
     // TODO: would be nice to somehow allow this to act like
     // InstantiatedIndex, by never writing to disk; ie you write

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Pulsing/Pulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/Pulsing41PostingsFormat.cs b/src/Lucene.Net.Codecs/Pulsing/Pulsing41PostingsFormat.cs
index 000c232..006b43a 100644
--- a/src/Lucene.Net.Codecs/Pulsing/Pulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/Pulsing41PostingsFormat.cs
@@ -1,23 +1,23 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Codecs.Lucene41;
 
 namespace Lucene.Net.Codecs.Pulsing
 {
-    using Lucene41;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Concrete pulsing implementation over {@link Lucene41PostingsFormat}.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsFormat.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsFormat.cs
index 8f64077..67fa9da 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsFormat.cs
@@ -1,26 +1,25 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
+using Lucene.Net.Util;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Pulsing
 {
-    using System;
-    using System.Diagnostics;
-    using Index;
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// This postings format "inlines" the postings for terms that have

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
index 8f776bc..b99d5cf 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
@@ -1,31 +1,29 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+using Lucene.Net.Index;
+using Lucene.Net.Store;
 using Lucene.Net.Support;
+using Lucene.Net.Util;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Pulsing
 {
-
-    using System;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using Index;
-    using Store;
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Concrete class that reads the current doc/freq/skip postings format 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
index ac443f6..d703b23 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
@@ -1,28 +1,27 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Pulsing
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using Index;
-    using Store;
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// TODO: we now inline based on total TF of the term,

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
index a0065c0..5cc867e 100644
--- a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
@@ -1,24 +1,24 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Store;
+using System;
 
 namespace Lucene.Net.Codecs.Sep
 {
-    using Store;
-    using System;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Defines basic API for writing ints to an IndexOutput.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs b/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
index a374b80..2744ae2 100644
--- a/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
@@ -1,24 +1,24 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Store;
+using System;
 
 namespace Lucene.Net.Codecs.Sep
 {
-    using System;
-    using Store;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Defines basic API for writing ints to an IndexOutput.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs b/src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs
index 1f84e48..f3f0c49 100644
--- a/src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs
@@ -1,24 +1,23 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Store;
 
 namespace Lucene.Net.Codecs.Sep
 {
-
-    using Store;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Provides int reader and writer to specified files.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
index 60dc069..02abf66 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
@@ -1,27 +1,26 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Sep
 {
-
-    using System.Diagnostics;
-    using Index;
-    using Store;
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Concrete class that reads the current doc/freq/skip

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
index 8489b3d..ff8bfb2 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
@@ -1,26 +1,26 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Sep
 {
-    using System.Diagnostics;
-    using Index;
-    using Store;
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Writes frq to .frq, docs to .doc, pos to .pos, payloads

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
index fdd17e7..cfae7df 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
@@ -1,26 +1,26 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Support;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Sep
 {
-    using System.Diagnostics;
-    using Index;
-    using Store;
-    using Support;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Implements the skip list reader for the default posting list format

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
index cbbd970..feedd66 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
@@ -1,26 +1,26 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Support;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Sep
 {
-    using System.Diagnostics;
-    using Index;
-    using Store;
-    using Support;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Implements the skip list writer for the default posting list format

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextCodec.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextCodec.cs
index d86b2d5..cfe434f 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextCodec.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextCodec.cs
@@ -1,22 +1,21 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.SimpleText
+\ufeffnamespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// plain text index format.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesFormat.cs
index b99dc1c..8c407a2 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesFormat.cs
@@ -1,24 +1,23 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.SimpleText
+\ufeffnamespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-	using SegmentReadState = Index.SegmentReadState;
+    using SegmentReadState = Index.SegmentReadState;
 	using SegmentWriteState = Index.SegmentWriteState;
 
     /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
index 8e03742..09b58f6 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
@@ -1,48 +1,45 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
+using System.Numerics;
+using System.Text;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
-    using System;
-    using System.Diagnostics;
-    using System.Collections.Generic;
-    using System.ComponentModel;
-    using System.Globalization;
-    using System.Text;
-    using Support;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     using BinaryDocValues = Index.BinaryDocValues;
+    using BufferedChecksumIndexInput = Store.BufferedChecksumIndexInput;
+    using BytesRef = Util.BytesRef;
+    using ChecksumIndexInput = Store.ChecksumIndexInput;
     using CorruptIndexException = Index.CorruptIndexException;
     using DocValues = Index.DocValues;
-    using FieldInfo = Index.FieldInfo;
     using DocValuesType = Index.DocValuesType;
+    using FieldInfo = Index.FieldInfo;
+    using IBits = Util.IBits;
     using IndexFileNames = Index.IndexFileNames;
+    using IndexInput = Store.IndexInput;
     using NumericDocValues = Index.NumericDocValues;
     using SegmentReadState = Index.SegmentReadState;
     using SortedDocValues = Index.SortedDocValues;
     using SortedSetDocValues = Index.SortedSetDocValues;
-    using BufferedChecksumIndexInput = Store.BufferedChecksumIndexInput;
-    using ChecksumIndexInput = Store.ChecksumIndexInput;
-    using IndexInput = Store.IndexInput;
-    using IBits = Util.IBits;
-    using BytesRef = Util.BytesRef;
     using StringHelper = Util.StringHelper;
-    using System.Numerics;
-    using System.Text.RegularExpressions;
 
     public class SimpleTextDocValuesReader : DocValuesProducer // LUCENENET NOTE: Changed from internal to public because it is subclassed by a public class
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
index df88f2d..8a96be6 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
@@ -1,37 +1,36 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
+using System.Numerics;
+using System.Text;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using System;
-    using System.Diagnostics;
-    using System.Collections.Generic;
-    using System.Globalization;
-    using System.Numerics;
-    using System.Text;
-
+    using BytesRef = Util.BytesRef;
+    using DocValuesType = Index.DocValuesType;
     using FieldInfo = Index.FieldInfo;
     using IndexFileNames = Index.IndexFileNames;
-    using SegmentWriteState = Index.SegmentWriteState;
-    using DocValuesType = Index.DocValuesType;
     using IndexOutput = Store.IndexOutput;
-    using BytesRef = Util.BytesRef;
     using IOUtils = Util.IOUtils;
+    using SegmentWriteState = Index.SegmentWriteState;
 
     public class SimpleTextDocValuesWriter : DocValuesConsumer // LUCENENET NOTE: changed from internal to public because it is subclassed by a public type
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosFormat.cs
index f8852ea..50ca57d 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosFormat.cs
@@ -1,22 +1,21 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.SimpleText
+\ufeffnamespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// plaintext field infos format

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
index e3a9e47..e173c24 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
@@ -1,40 +1,37 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
+\ufeffusing System;
+using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.Text;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
-    using System;
-    using System.Diagnostics;
-    using System.Collections.Generic;
-    using Support;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
+    using BytesRef = Util.BytesRef;
+    using Directory = Store.Directory;
     using FieldInfo = Index.FieldInfo;
     using FieldInfos = Index.FieldInfos;
     using IndexFileNames = Index.IndexFileNames;
-    using Directory = Store.Directory;
-    using IOContext = Store.IOContext;
     using IndexOptions = Lucene.Net.Index.IndexOptions;
-    using BytesRef = Util.BytesRef;
+    using IOContext = Store.IOContext;
     using IOUtils = Util.IOUtils;
     using StringHelper = Util.StringHelper;
-    using System.Text;
 
     /// <summary>
     /// reads plaintext field infos files

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
index 2f151b4..84dd56e 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
@@ -1,37 +1,35 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using System;
-    using System.Diagnostics;
-    using System.Collections.Generic;
-
-    using FieldInfo = Index.FieldInfo;
+    using BytesRef = Util.BytesRef;
+    using Directory = Store.Directory;
     using DocValuesType = Index.DocValuesType;
+    using FieldInfo = Index.FieldInfo;
     using FieldInfos = Index.FieldInfos;
     using IndexFileNames = Index.IndexFileNames;
-    using Directory = Store.Directory;
+    using IndexOptions = Lucene.Net.Index.IndexOptions;
     using IOContext = Store.IOContext;
-    using BytesRef = Util.BytesRef;
     using IOUtils = Util.IOUtils;
-    using IndexOptions = Lucene.Net.Index.IndexOptions;
-    using System.Globalization;
 
     /// <summary>
     /// writes plaintext field infos files

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
index 140afea..83047a4 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
@@ -1,55 +1,51 @@
-\ufeff/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+\ufeffusing Lucene.Net.Util.Fst;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using System;
-    using System.Diagnostics;
-    using System.Collections.Generic;
-    using System.Linq;
-    using System.Text;
-    using Support;
-    using Util.Fst;
-    
+    using ArrayUtil = Util.ArrayUtil;
+    using BufferedChecksumIndexInput = Store.BufferedChecksumIndexInput;
+    using BytesRef = Util.BytesRef;
+    using CharsRef = Util.CharsRef;
+    using ChecksumIndexInput = Store.ChecksumIndexInput;
     using DocsAndPositionsEnum = Index.DocsAndPositionsEnum;
     using DocsEnum = Index.DocsEnum;
     using FieldInfo = Index.FieldInfo;
-    using IndexOptions = Index.IndexOptions;
     using FieldInfos = Index.FieldInfos;
-    using SegmentReadState = Index.SegmentReadState;
-    using Terms = Index.Terms;
-    using TermsEnum = Index.TermsEnum;
-    using BufferedChecksumIndexInput = Store.BufferedChecksumIndexInput;
-    using ChecksumIndexInput = Store.ChecksumIndexInput;
-    using IndexInput = Store.IndexInput;
-    using ArrayUtil = Util.ArrayUtil;
-    using IBits = Util.IBits;
-    using BytesRef = Util.BytesRef;
-    using CharsRef = Util.CharsRef;
     using FixedBitSet = Util.FixedBitSet;
-    using IOUtils = Util.IOUtils;
+    using FST = Util.Fst.FST;
+    using IBits = Util.IBits;
+    using IndexInput = Store.IndexInput;
+    using IndexOptions = Index.IndexOptions;
     using IntsRef = Util.IntsRef;
+    using IOUtils = Util.IOUtils;
+    using PositiveIntOutputs = Util.Fst.PositiveIntOutputs;
+    using SegmentReadState = Index.SegmentReadState;
     using StringHelper = Util.StringHelper;
+    using Terms = Index.Terms;
+    using TermsEnum = Index.TermsEnum;
     using UnicodeUtil = Util.UnicodeUtil;
-    using BytesRefFSTEnum = Util.Fst.BytesRefFSTEnum<Util.Fst.PairOutputs<long,long>.Pair>;
-    using FST = Util.Fst.FST;
-    using PairOutputs = Util.Fst.PairOutputs<long,long>;
-    using PositiveIntOutputs = Util.Fst.PositiveIntOutputs;
     using Util = Util.Fst.Util;
 
     internal class SimpleTextFieldsReader : FieldsProducer

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
index 3edeeac..0cffcce 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsWriter.cs
@@ -1,27 +1,27 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
+\ufeffusing System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
     using IndexOptions = Index.IndexOptions;
     using FieldInfo = Index.FieldInfo;
     using SegmentWriteState = Index.SegmentWriteState;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
index f856043..bd1d709 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextLiveDocsFormat.cs
@@ -1,44 +1,43 @@
-\ufeff/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+\ufeffusing Lucene.Net.Support;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
-
-    using System;
-    using System.Diagnostics;
-    using System.Collections;
-    using System.Collections.Generic;
-    using System.Globalization;
-    using Support;
-
-	using IndexFileNames = Index.IndexFileNames;
-	using SegmentCommitInfo = Index.SegmentCommitInfo;
-	using ChecksumIndexInput = Store.ChecksumIndexInput;
-	using Directory = Store.Directory;
-	using IOContext = Store.IOContext;
-	using IndexOutput = Store.IndexOutput;
-	using ArrayUtil = Util.ArrayUtil;
-	using IBits = Util.IBits;
-	using BytesRef = Util.BytesRef;
-	using CharsRef = Util.CharsRef;
-	using IOUtils = Util.IOUtils;
-	using IMutableBits = Util.IMutableBits;
-	using StringHelper = Util.StringHelper;
-	using UnicodeUtil = Util.UnicodeUtil;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    using ArrayUtil = Util.ArrayUtil;
+    using BytesRef = Util.BytesRef;
+    using CharsRef = Util.CharsRef;
+    using ChecksumIndexInput = Store.ChecksumIndexInput;
+    using Directory = Store.Directory;
+    using IBits = Util.IBits;
+    using IMutableBits = Util.IMutableBits;
+    using IndexFileNames = Index.IndexFileNames;
+    using IndexOutput = Store.IndexOutput;
+    using IOContext = Store.IOContext;
+    using IOUtils = Util.IOUtils;
+    using SegmentCommitInfo = Index.SegmentCommitInfo;
+    using StringHelper = Util.StringHelper;
+    using UnicodeUtil = Util.UnicodeUtil;
 
     /// <summary>
     /// reads/writes plaintext live docs

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
index f2aff9a..3336938 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextNormsFormat.cs
@@ -1,22 +1,21 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.SimpleText
+\ufeffnamespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     using SegmentReadState = Index.SegmentReadState;
     using SegmentWriteState = Index.SegmentWriteState;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
index 6660efc..7003043 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextPostingsFormat.cs
@@ -1,24 +1,23 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.SimpleText
+\ufeffnamespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-	using SegmentWriteState = Index.SegmentWriteState;
+    using SegmentWriteState = Index.SegmentWriteState;
 	using SegmentReadState = Index.SegmentReadState;
 	using IndexFileNames = Index.IndexFileNames;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
index f24a1e3..ef3cc4c 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoFormat.cs
@@ -1,22 +1,21 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.SimpleText
+\ufeffnamespace Lucene.Net.Codecs.SimpleText
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// plain text segments file format.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
index e42cacc..000f212 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoReader.cs
@@ -1,38 +1,36 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Lucene.Net.Support;
+\ufeffusing System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
+using System.Text;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
-    using System;
-    using System.Diagnostics;
-    using System.Collections.Generic;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using IndexFileNames = Index.IndexFileNames;
-    using SegmentInfo = Index.SegmentInfo;
+    using BytesRef = Util.BytesRef;
     using ChecksumIndexInput = Store.ChecksumIndexInput;
     using Directory = Store.Directory;
+    using IndexFileNames = Index.IndexFileNames;
     using IOContext = Store.IOContext;
-    using BytesRef = Util.BytesRef;
     using IOUtils = Util.IOUtils;
+    using SegmentInfo = Index.SegmentInfo;
     using StringHelper = Util.StringHelper;
-    using System.Text;
-    using System.Globalization;
 
     /// <summary>
     /// reads plaintext segments files

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
index c9464a9..d12df2f 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextSegmentInfoWriter.cs
@@ -1,33 +1,33 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing System;
+using System.Collections.Generic;
+using System.Globalization;
 
 namespace Lucene.Net.Codecs.SimpleText
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Globalization;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
+    using BytesRef = Util.BytesRef;
+    using Directory = Store.Directory;
     using FieldInfos = Index.FieldInfos;
     using IndexFileNames = Index.IndexFileNames;
-    using SegmentInfo = Index.SegmentInfo;
-    using Directory = Store.Directory;
     using IOContext = Store.IOContext;
-    using BytesRef = Util.BytesRef;
     using IOUtils = Util.IOUtils;
+    using SegmentInfo = Index.SegmentInfo;
 
     /// <summary>
     /// writes plaintext segments files


[04/37] lucenenet git commit: Lucene.Net.Codecs: member accessibility

Posted by ni...@apache.org.
Lucene.Net.Codecs: member accessibility


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

Branch: refs/heads/api-work
Commit: c602c98f3119bc345bc80a08a4d2f2d49e788261
Parents: 2860403
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 13:52:35 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 13:52:35 2017 +0700

----------------------------------------------------------------------
 .../Appending/AppendingCodec.cs                 |   4 +-
 .../Appending/AppendingPostingsFormat.cs        |   5 +-
 .../Appending/AppendingTermsReader.cs           |   6 +-
 .../BlockTerms/BlockTermsReader.cs              | 144 ++++---
 .../BlockTerms/BlockTermsWriter.cs              |  97 ++---
 .../BlockTerms/FixedGapTermsIndexReader.cs      | 174 ++++-----
 .../BlockTerms/FixedGapTermsIndexWriter.cs      | 166 ++++----
 .../BlockTerms/TermsIndexReaderBase.cs          |  37 +-
 .../BlockTerms/TermsIndexWriterBase.cs          |   9 +-
 .../BlockTerms/VariableGapTermsIndexReader.cs   | 166 ++++----
 .../BlockTerms/VariableGapTermsIndexWriter.cs   |  47 +--
 .../Bloom/BloomFilterFactory.cs                 |   4 +-
 .../Bloom/BloomFilteringPostingsFormat.cs       |  93 +++--
 .../Bloom/DefaultBloomFilterFactory.cs          |   2 -
 src/Lucene.Net.Codecs/Bloom/FuzzySet.cs         |  50 ++-
 src/Lucene.Net.Codecs/Bloom/HashFunction.cs     |   1 -
 src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs      |   6 +-
 .../DiskDV/DiskDocValuesFormat.cs               |  13 +-
 .../DiskDV/DiskDocValuesProducer.cs             |  11 +-
 src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs |   9 +-
 src/Lucene.Net.Codecs/HashMapHelperClass.cs     |   4 +-
 .../Intblock/FixedIntBlockIndexInput.cs         |  19 +-
 .../Intblock/FixedIntBlockIndexOutput.cs        |   8 +-
 .../Intblock/VariableIntBlockIndexInput.cs      |  20 +-
 .../Intblock/VariableIntBlockIndexOutput.cs     |  18 +-
 .../Memory/DirectDocValuesConsumer.cs           |   6 +-
 .../Memory/DirectDocValuesFormat.cs             |  14 +-
 .../Memory/DirectDocValuesProducer.cs           |   2 +-
 .../Memory/DirectPostingsFormat.cs              | 158 ++++----
 .../Memory/FSTOrdPostingsFormat.cs              |   4 +-
 .../Memory/FSTOrdPulsing41PostingsFormat.cs     |   6 +-
 .../Memory/FSTOrdTermsReader.cs                 |  66 ++--
 .../Memory/FSTOrdTermsWriter.cs                 |  14 +-
 .../Memory/FSTPostingsFormat.cs                 |   4 +-
 .../Memory/FSTPulsing41PostingsFormat.cs        |   7 +-
 src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs  |  17 +-
 src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs  | 116 +++---
 src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs  |   2 +-
 .../Memory/MemoryDocValuesConsumer.cs           |  19 +-
 .../Memory/MemoryDocValuesFormat.cs             |  19 +-
 .../Memory/MemoryDocValuesProducer.cs           |  15 +-
 .../Memory/MemoryPostingsFormat.cs              | 168 ++++-----
 .../Pulsing/Pulsing41PostingsFormat.cs          |  12 +-
 .../Pulsing/PulsingPostingsFormat.cs            |  22 +-
 .../Pulsing/PulsingPostingsReader.cs            | 317 ++++++++--------
 .../Pulsing/PulsingPostingsWriter.cs            |  18 +-
 src/Lucene.Net.Codecs/RectangularArrays.cs      |   2 +-
 src/Lucene.Net.Codecs/Sep/IntIndexInput.cs      |   8 +-
 src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs     |   9 +-
 src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs   |   2 -
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs  | 179 +++++----
 src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs  |  47 ++-
 src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs  |   2 -
 src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs  | 376 +++++++++----------
 .../SimpleText/SimpleTextCodec.cs               |   4 +-
 .../SimpleText/SimpleTextDocValuesFormat.cs     |   7 +-
 .../SimpleText/SimpleTextDocValuesReader.cs     | 353 +++++++++--------
 .../SimpleText/SimpleTextDocValuesWriter.cs     |  64 ++--
 .../SimpleText/SimpleTextFieldInfosReader.cs    |   2 +-
 .../SimpleText/SimpleTextFieldInfosWriter.cs    |   2 -
 .../SimpleText/SimpleTextFieldsReader.cs        |  27 +-
 .../SimpleText/SimpleTextFieldsWriter.cs        |  40 +-
 .../SimpleText/SimpleTextLiveDocsFormat.cs      |  22 +-
 .../SimpleText/SimpleTextNormsFormat.cs         |   6 +-
 .../SimpleText/SimpleTextPostingsFormat.cs      |  13 +-
 .../SimpleText/SimpleTextSegmentInfoFormat.cs   |  44 ++-
 .../SimpleText/SimpleTextSegmentInfoReader.cs   |   3 +-
 .../SimpleText/SimpleTextSegmentInfoWriter.cs   |   2 -
 .../SimpleText/SimpleTextStoredFieldsFormat.cs  |   1 -
 .../SimpleText/SimpleTextStoredFieldsReader.cs  |   2 +-
 .../SimpleText/SimpleTextStoredFieldsWriter.cs  |   3 +-
 .../SimpleText/SimpleTextTermVectorsFormat.cs   |   1 -
 .../SimpleText/SimpleTextTermVectorsReader.cs   |  41 +-
 .../SimpleText/SimpleTextTermVectorsWriter.cs   |   1 -
 .../SimpleText/SimpleTextUtil.cs                |   4 +-
 src/Lucene.Net.Codecs/StringHelperClass.cs      |   2 +
 .../Index/DocsAndPositionsEnum.cs               |   2 +-
 src/Lucene.Net.Core/Index/Fields.cs             |   2 +-
 78 files changed, 1667 insertions(+), 1725 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Appending/AppendingCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Appending/AppendingCodec.cs b/src/Lucene.Net.Codecs/Appending/AppendingCodec.cs
index fbba94c..3b87595 100644
--- a/src/Lucene.Net.Codecs/Appending/AppendingCodec.cs
+++ b/src/Lucene.Net.Codecs/Appending/AppendingCodec.cs
@@ -34,7 +34,8 @@ namespace Lucene.Net.Codecs.Appending
     {
         private readonly PostingsFormat _postings = new AppendingPostingsFormat();
 
-        public AppendingCodec() : base("Appending", new Lucene40Codec())
+        public AppendingCodec() 
+            : base("Appending", new Lucene40Codec())
         {
         }
 
@@ -43,6 +44,5 @@ namespace Lucene.Net.Codecs.Appending
             get { return _postings; }
         }
     }
-
 }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Appending/AppendingPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Appending/AppendingPostingsFormat.cs b/src/Lucene.Net.Codecs/Appending/AppendingPostingsFormat.cs
index 3270383..d15d75c 100644
--- a/src/Lucene.Net.Codecs/Appending/AppendingPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Appending/AppendingPostingsFormat.cs
@@ -26,9 +26,10 @@ namespace Lucene.Net.Codecs.Appending
     /// </summary>
     internal class AppendingPostingsFormat : PostingsFormat
     {
-        public static String CODEC_NAME = "Appending";
+        public static string CODEC_NAME = "Appending";
 
-        public AppendingPostingsFormat() : base(CODEC_NAME)
+        public AppendingPostingsFormat() 
+            : base(CODEC_NAME)
         {}
 
         public override FieldsConsumer FieldsConsumer(SegmentWriteState state)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs b/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
index edd6035..3929f83 100644
--- a/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
@@ -29,12 +29,12 @@ namespace Lucene.Net.Codecs.Appending
     [Obsolete("Only for reading old Appending segments")]
     public class AppendingTermsReader : BlockTreeTermsReader
     {
-        private const String APPENDING_TERMS_CODEC_NAME = "APPENDING_TERMS_DICT";
-        private const String APPENDING_TERMS_INDEX_CODEC_NAME = "APPENDING_TERMS_INDEX";
+        private const string APPENDING_TERMS_CODEC_NAME = "APPENDING_TERMS_DICT";
+        private const string APPENDING_TERMS_INDEX_CODEC_NAME = "APPENDING_TERMS_INDEX";
 
         public AppendingTermsReader(Directory dir, FieldInfos fieldInfos, SegmentInfo info,
             PostingsReaderBase postingsReader,
-            IOContext ioContext, String segmentSuffix, int indexDivisor)
+            IOContext ioContext, string segmentSuffix, int indexDivisor)
             : base(dir, fieldInfos, info, postingsReader, ioContext, segmentSuffix, indexDivisor)
         {
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
index 8ab0ef6..b287f95 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
@@ -41,7 +41,6 @@ namespace Lucene.Net.Codecs.BlockTerms
     /// </summary>
     public class BlockTermsReader : FieldsProducer
     {
-
         // Open input to the main terms dict file (_X.tis)
         private readonly IndexInput _input;
 
@@ -59,9 +58,46 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private readonly int _version;
 
+        /// <summary>
+        /// Used as a key for the terms cache
+        /// </summary>
+        private class FieldAndTerm : DoubleBarrelLRUCache.CloneableKey
+        {
+            public string Field { get; set; }
+            private BytesRef Term { get; set; }
+
+            public FieldAndTerm()
+            {
+            }
+
+            private FieldAndTerm(FieldAndTerm other)
+            {
+                Field = other.Field;
+                Term = BytesRef.DeepCopyOf(other.Term);
+            }
+
+            public override bool Equals(object other)
+            {
+                var o = (FieldAndTerm)other;
+                return o.Field.Equals(Field) && Term.BytesEquals(o.Term);
+            }
+
+            public override DoubleBarrelLRUCache.CloneableKey Clone()
+            {
+                return new FieldAndTerm(this);
+            }
+
+            public override int GetHashCode()
+            {
+                return Field.GetHashCode() * 31 + Term.GetHashCode();
+            }
+        }
+
+        // private string segment;
+
         public BlockTermsReader(TermsIndexReaderBase indexReader, Directory dir, FieldInfos fieldInfos, SegmentInfo info,
             PostingsReaderBase postingsReader, IOContext context,
-            String segmentSuffix)
+            string segmentSuffix)
         {
             _postingsReader = postingsReader;
 
@@ -84,7 +120,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 int numFields = _input.ReadVInt();
                 if (numFields < 0)
                 {
-                    throw new CorruptIndexException(String.Format("Invalid number of fields: {0}, Resource: {1}",
+                    throw new CorruptIndexException(string.Format("Invalid number of fields: {0}, Resource: {1}",
                         numFields, _input));
                 }
 
@@ -108,7 +144,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     {
                         // #docs with field must be <= #docs
                         throw new CorruptIndexException(
-                            String.Format("Invalid DocCount: {0}, MaxDoc: {1}, Resource: {2}", docCount, info.DocCount,
+                            string.Format("Invalid DocCount: {0}, MaxDoc: {1}, Resource: {2}", docCount, info.DocCount,
                                 _input));
                     }
 
@@ -116,7 +152,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     {
                         // #postings must be >= #docs with field
                         throw new CorruptIndexException(
-                            String.Format("Invalid sumDocFreq: {0}, DocCount: {1}, Resource: {2}", sumDocFreq, docCount,
+                            string.Format("Invalid sumDocFreq: {0}, DocCount: {1}, Resource: {2}", sumDocFreq, docCount,
                                 _input));
                     }
 
@@ -124,7 +160,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     {
                         // #positions must be >= #postings
                         throw new CorruptIndexException(
-                            String.Format("Invalid sumTotalTermFreq: {0}, sumDocFreq: {1}, Resource: {2}",
+                            string.Format("Invalid sumTotalTermFreq: {0}, sumDocFreq: {1}, Resource: {2}",
                                 sumTotalTermFreq, sumDocFreq, _input));
                     }
 
@@ -137,7 +173,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     }
                     catch (ArgumentException)
                     {
-                        throw new CorruptIndexException(String.Format("Duplicate fields: {0}, Resource: {1}",
+                        throw new CorruptIndexException(string.Format("Duplicate fields: {0}, Resource: {1}",
                             fieldInfo.Name, _input));
                     }
 
@@ -213,74 +249,18 @@ namespace Lucene.Net.Codecs.BlockTerms
             return _fields.Keys.GetEnumerator();
         }
 
-        public override Terms Terms(String field)
+        public override Terms Terms(string field)
         {
             Debug.Assert(field != null);
 
             return _fields[field];
         }
 
-        public override long RamBytesUsed()
-        {
-            var sizeInBytes = (_postingsReader != null) ? _postingsReader.RamBytesUsed() : 0;
-            sizeInBytes += (_indexReader != null) ? _indexReader.RamBytesUsed : 0;
-            return sizeInBytes;
-        }
-
-        public override void CheckIntegrity()
-        {
-            // verify terms
-            if (_version >= BlockTermsWriter.VERSION_CHECKSUM)
-            {
-                CodecUtil.ChecksumEntireFile(_input);
-            }
-            // verify postings
-            _postingsReader.CheckIntegrity();
-        }
-
         public override int Count
         {
             get
             {
-                {
-                    return _fields.Count;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Used as a key for the terms cache
-        /// </summary>
-        private class FieldAndTerm : DoubleBarrelLRUCache.CloneableKey
-        {
-            public String Field { get; set; }
-            private BytesRef Term { get; set; }
-
-            private FieldAndTerm(FieldAndTerm other)
-            {
-                Field = other.Field;
-                Term = BytesRef.DeepCopyOf(other.Term);
-            }
-
-            public override bool Equals(Object other)
-            {
-                var o = (FieldAndTerm)other;
-                return o.Field.Equals(Field) && Term.BytesEquals(o.Term);
-            }
-
-            public override DoubleBarrelLRUCache.CloneableKey Clone()
-            {
-                return new FieldAndTerm(this);
-            }
-
-            public override int GetHashCode()
-            {
-                return Field.GetHashCode() * 31 + Term.GetHashCode();
-            }
-
-            public FieldAndTerm()
-            {
-
+                return _fields.Count;
             }
         }
 
@@ -419,7 +399,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     _fieldReader = fieldReader;
                     _blockTermsReader = blockTermsReader;
 
-                    _input = (IndexInput) _blockTermsReader._input.Clone();
+                    _input = (IndexInput)_blockTermsReader._input.Clone();
                     _input.Seek(_fieldReader._termsStartPointer);
                     _indexEnum = _blockTermsReader._indexReader.GetFieldEnum(_fieldReader._fieldInfo);
                     _doOrd = _blockTermsReader._indexReader.SupportsOrd;
@@ -450,7 +430,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 {
                     if (_indexEnum == null)
                         throw new InvalidOperationException("terms index was not loaded");
-                  
+
                     var doSeek = true;
 
                     // See if we can avoid seeking, because target term
@@ -461,7 +441,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
                         if (cmp == 0)
                             return SeekStatus.FOUND;     // Already at the requested term
-                        
+
                         if (cmp < 0)
                         {
                             // Target term is after current term
@@ -501,7 +481,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
                         if (_doOrd)
                             _state.Ord = _indexEnum.Ord - 1;
-                        
+
                         _term.CopyBytes(_indexEnum.Term);
                     }
                     else
@@ -660,7 +640,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                                 _termSuffixesReader.ReadBytes(_term.Bytes, _termBlockPrefix, suffix);
                                 break;
                             }
-                            
+
                             _termSuffixesReader.SkipBytes(suffix);
                         }
 
@@ -794,7 +774,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 {
                     //System.out.println("BTR.seekExact termState target=" + target.utf8ToString() + " " + target + " this=" + this);
                     Debug.Assert(otherState is BlockTermState);
-                    Debug.Assert(!_doOrd || ((BlockTermState) otherState).Ord < _fieldReader._numTerms);
+                    Debug.Assert(!_doOrd || ((BlockTermState)otherState).Ord < _fieldReader._numTerms);
                     _state.CopyFrom(otherState);
                     _seekPending = true;
                     _indexIsCurrent = false;
@@ -804,7 +784,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 public override TermState GetTermState()
                 {
                     DecodeMetaData();
-                    return (TermState) _state.Clone();
+                    return (TermState)_state.Clone();
                 }
 
                 public override void SeekExact(long ord)
@@ -833,7 +813,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     _term.CopyBytes(_indexEnum.Term);
 
                     // Now, scan:
-                    var left = (int) (ord - _state.Ord);
+                    var left = (int)(ord - _state.Ord);
                     while (left > 0)
                     {
                         var term = _next();
@@ -970,6 +950,22 @@ namespace Lucene.Net.Codecs.BlockTerms
             }
         }
 
-     
+        public override long RamBytesUsed()
+        {
+            var sizeInBytes = (_postingsReader != null) ? _postingsReader.RamBytesUsed() : 0;
+            sizeInBytes += (_indexReader != null) ? _indexReader.RamBytesUsed : 0;
+            return sizeInBytes;
+        }
+
+        public override void CheckIntegrity()
+        {
+            // verify terms
+            if (_version >= BlockTermsWriter.VERSION_CHECKSUM)
+            {
+                CodecUtil.ChecksumEntireFile(_input);
+            }
+            // verify postings
+            _postingsReader.CheckIntegrity();
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
index 5f782d6..81411a7 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
@@ -36,8 +36,7 @@ namespace Lucene.Net.Codecs.BlockTerms
     /// </remarks>
     public class BlockTermsWriter : FieldsConsumer
     {
-
-        public const String CODEC_NAME = "BLOCK_TERMS_DICT";
+        internal const string CODEC_NAME = "BLOCK_TERMS_DICT";
 
         // Initial format
         public const int VERSION_START = 0;
@@ -46,14 +45,40 @@ namespace Lucene.Net.Codecs.BlockTerms
         public const int VERSION_CHECKSUM = 3;
         public const int VERSION_CURRENT = VERSION_CHECKSUM;
 
-        /** Extension of terms file */
-        public const String TERMS_EXTENSION = "tib";
+        /// <summary>Extension of terms file</summary>
+        public const string TERMS_EXTENSION = "tib";
 
-        private IndexOutput _output;
-        protected readonly PostingsWriterBase PostingsWriter;
-        protected readonly FieldInfos FieldInfos;
-        protected FieldInfo CurrentField;
+        protected IndexOutput _output;
+        private readonly PostingsWriterBase PostingsWriter;
+        private readonly FieldInfos FieldInfos;
+        private FieldInfo CurrentField;
         private readonly TermsIndexWriterBase _termsIndexWriter;
+        
+        protected class FieldMetaData
+        {
+            public FieldInfo FieldInfo { get; private set; }
+            public long NumTerms { get; private set; }
+            public long TermsStartPointer { get; private set; }
+            public long SumTotalTermFreq { get; private set; }
+            public long SumDocFreq { get; private set; }
+            public int DocCount { get; private set; }
+            public int LongsSize { get; private set; }
+
+            public FieldMetaData(FieldInfo fieldInfo, long numTerms, long termsStartPointer, long sumTotalTermFreq,
+                long sumDocFreq, int docCount, int longsSize)
+            {
+                Debug.Assert(numTerms > 0);
+
+                FieldInfo = fieldInfo;
+                TermsStartPointer = termsStartPointer;
+                NumTerms = numTerms;
+                SumTotalTermFreq = sumTotalTermFreq;
+                SumDocFreq = sumDocFreq;
+                DocCount = docCount;
+                LongsSize = longsSize;
+            }
+        }
+
         private readonly List<FieldMetaData> _fields = new List<FieldMetaData>();
 
         public BlockTermsWriter(TermsIndexWriterBase termsIndexWriter,
@@ -140,59 +165,32 @@ namespace Lucene.Net.Codecs.BlockTerms
             _output.WriteLong(dirStart);
         }
 
-        protected class FieldMetaData
-        {
-            public FieldInfo FieldInfo { get; private set; }
-            public long NumTerms { get; private set; }
-            public long TermsStartPointer { get; private set; }
-            public long SumTotalTermFreq { get; private set; }
-            public long SumDocFreq { get; private set; }
-            public int DocCount { get; private set; }
-            public int LongsSize { get; private set; }
-
-            public FieldMetaData(FieldInfo fieldInfo, long numTerms, long termsStartPointer, long sumTotalTermFreq,
-                long sumDocFreq, int docCount, int longsSize)
-            {
-                Debug.Assert(numTerms > 0);
-
-                FieldInfo = fieldInfo;
-                TermsStartPointer = termsStartPointer;
-                NumTerms = numTerms;
-                SumTotalTermFreq = sumTotalTermFreq;
-                SumDocFreq = sumDocFreq;
-                DocCount = docCount;
-                LongsSize = longsSize;
-            }
-        }
-
         private class TermEntry
         {
             public readonly BytesRef Term = new BytesRef();
             public BlockTermState State;
         }
 
-        public class TermsWriter : TermsConsumer
+        internal class TermsWriter : TermsConsumer
         {
-            private readonly RAMOutputStream _bytesWriter = new RAMOutputStream();
-            private readonly RAMOutputStream _bufferWriter = new RAMOutputStream();
-            private readonly BytesRef _lastPrevTerm = new BytesRef();
-            
+            // Outer instance
+            private readonly BlockTermsWriter _btw;
+
             private readonly FieldInfo _fieldInfo;
             private readonly PostingsWriterBase _postingsWriter;
             private readonly long _termsStartPointer;
-            private readonly TermsIndexWriterBase.FieldWriter _fieldIndexWriter;
-            private readonly BlockTermsWriter _btw;
-
-            private TermEntry[] _pendingTerms;
-            private int _pendingCount;
-
             private long _numTerms;
+            private readonly TermsIndexWriterBase.FieldWriter _fieldIndexWriter;
             private long _sumTotalTermFreq;
             private long _sumDocFreq;
             private int _docCount;
             private readonly int _longsSize;
 
-            public TermsWriter(
+            private TermEntry[] _pendingTerms;
+
+            private int _pendingCount;
+
+            internal TermsWriter(
                 TermsIndexWriterBase.FieldWriter fieldIndexWriter,
                 FieldInfo fieldInfo,
                 PostingsWriterBase postingsWriter, BlockTermsWriter btw)
@@ -222,9 +220,10 @@ namespace Lucene.Net.Codecs.BlockTerms
                 return _postingsWriter;
             }
 
+            private readonly BytesRef _lastPrevTerm = new BytesRef();
+
             public override void FinishTerm(BytesRef text, TermStats stats)
             {
-
                 Debug.Assert(stats.DocFreq > 0);
 
                 var isIndexTerm = _fieldIndexWriter.CheckIndexTerm(text, stats);
@@ -291,7 +290,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
             }
 
-            private static int SharedPrefix(BytesRef term1, BytesRef term2)
+            private int SharedPrefix(BytesRef term1, BytesRef term2)
             {
                 Debug.Assert(term1.Offset == 0);
                 Debug.Assert(term2.Offset == 0);
@@ -313,6 +312,9 @@ namespace Lucene.Net.Codecs.BlockTerms
                 return pos1;
             }
 
+            private readonly RAMOutputStream _bytesWriter = new RAMOutputStream();
+            private readonly RAMOutputStream _bufferWriter = new RAMOutputStream();
+
             private void FlushBlock()
             {
                 // First pass: compute common prefix for all terms
@@ -385,6 +387,5 @@ namespace Lucene.Net.Codecs.BlockTerms
                 _pendingCount = 0;
             }
         }
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
index 611c1ed..0cb840d 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
@@ -191,75 +191,30 @@ namespace Lucene.Net.Codecs.BlockTerms
             return version;
         }
 
-        public override bool SupportsOrd
-        {
-            get { return true; }
-        }
-
-        public override FieldIndexEnum GetFieldEnum(FieldInfo fieldInfo)
-        {
-            FieldIndexData fieldData = _fields[fieldInfo];
-            return fieldData.CoreIndex == null ? null : new IndexEnum(fieldData.CoreIndex, this);
-        }
-
-        public override void Dispose()
-        {
-            if (_input != null && !_indexLoaded)
-                _input.Dispose();
-        }
-
-        private void SeekDir(IndexInput input, long dirOffset)
-        {
-            if (_version >= FixedGapTermsIndexWriter.VERSION_CHECKSUM)
-            {
-                input.Seek(input.Length - CodecUtil.FooterLength() - 8);
-                dirOffset = input.ReadLong();
-
-            }
-            else if (_version >= FixedGapTermsIndexWriter.VERSION_APPEND_ONLY)
-            {
-                input.Seek(input.Length - 8);
-                dirOffset = input.ReadLong();
-            }
-
-            input.Seek(dirOffset);
-        }
-
-        public override long RamBytesUsed
-        {
-            get
-            {
-                var sizeInBytes = ((_termBytes != null) ? _termBytes.RamBytesUsed() : 0) +
-                                  ((_termBytesReader != null) ? _termBytesReader.RamBytesUsed() : 0);
-
-                return _fields.Values.Aggregate(sizeInBytes,
-                    (current, entry) => (current + entry.CoreIndex.RamBytesUsed));
-            }
-        }
-
         private class IndexEnum : FieldIndexEnum
         {
-            private readonly FieldIndexData.CoreFieldIndex _fieldIndex;
+            // Outer intstance
             private readonly FixedGapTermsIndexReader _fgtir;
 
+            private readonly FieldIndexData.CoreFieldIndex _fieldIndex;
+            private readonly BytesRef term = new BytesRef();
+            private long ord;
+
             public IndexEnum(FieldIndexData.CoreFieldIndex fieldIndex, FixedGapTermsIndexReader fgtir)
             {
-                Term = new BytesRef();
                 _fieldIndex = fieldIndex;
                 _fgtir = fgtir;
             }
 
-            public override long Ord { get; set; }
+            public override sealed BytesRef Term { get { return term; } }
 
-            public override sealed BytesRef Term { get; set; }
-
-            public override long? Seek(BytesRef target)
+            public override long? Seek(BytesRef target) // LUCENENET TODO: return was not nullable in Lucene
             {
                 var lo = 0; // binary search
                 var hi = _fieldIndex.NumIndexTerms - 1;
 
                 Debug.Assert(_fgtir._totalIndexInterval > 0,
-                    String.Format("TotalIndexInterval: {0}", _fgtir._totalIndexInterval));
+                    string.Format("TotalIndexInterval: {0}", _fgtir._totalIndexInterval));
 
                 long offset;
                 int length;
@@ -268,7 +223,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     var mid = (int)((uint)(lo + hi) >> 1);
 
                     offset = _fieldIndex.TermOffsets.Get(mid);
-                    length = (int) (_fieldIndex.TermOffsets.Get(1 + mid) - offset);
+                    length = (int)(_fieldIndex.TermOffsets.Get(1 + mid) - offset);
                     _fgtir._termBytesReader.FillSlice(Term, _fieldIndex.TermBytesStart + offset, length);
 
                     int delta = _fgtir._termComp.Compare(target, Term);
@@ -283,7 +238,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     else
                     {
                         Debug.Assert(mid >= 0);
-                        Ord = mid * _fgtir._totalIndexInterval;
+                        ord = mid * _fgtir._totalIndexInterval;
                         return _fieldIndex.TermsStart + _fieldIndex.TermsDictOffsets.Get(mid);
                     }
                 }
@@ -295,22 +250,22 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
 
                 offset = _fieldIndex.TermOffsets.Get(hi);
-                length = (int) (_fieldIndex.TermOffsets.Get(1 + hi) - offset);
+                length = (int)(_fieldIndex.TermOffsets.Get(1 + hi) - offset);
                 _fgtir._termBytesReader.FillSlice(Term, _fieldIndex.TermBytesStart + offset, length);
 
-                Ord = hi * _fgtir._totalIndexInterval;
+                ord = hi * _fgtir._totalIndexInterval;
                 return _fieldIndex.TermsStart + _fieldIndex.TermsDictOffsets.Get(hi);
             }
 
-            public override long? Next
+            public override long? Next // LUCENENET TODO: Make into Next() method // LUCENENET TODO: return was not nullable in Lucene
             {
                 get
                 {
-                    var idx = 1 + (int)(Ord / _fgtir._totalIndexInterval);
+                    var idx = 1 + (int)(ord / _fgtir._totalIndexInterval);
                     if (idx >= _fieldIndex.NumIndexTerms)
                         return -1;
 
-                    Ord += _fgtir._totalIndexInterval;
+                    ord += _fgtir._totalIndexInterval;
 
                     var offset = _fieldIndex.TermOffsets.Get(idx);
                     var length = (int)(_fieldIndex.TermOffsets.Get(1 + idx) - offset);
@@ -321,7 +276,9 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
             }
 
-            public override long? Seek(long ord)
+            public override long Ord { get { return ord; } }
+
+            public override long? Seek(long ord) // LUCENENET TODO: return was not nullable in Lucene
             {
                 var idx = (int)(ord / _fgtir._totalIndexInterval);
 
@@ -332,23 +289,31 @@ namespace Lucene.Net.Codecs.BlockTerms
                 var length = (int)(_fieldIndex.TermOffsets.Get(1 + idx) - offset);
 
                 _fgtir._termBytesReader.FillSlice(Term, _fieldIndex.TermBytesStart + offset, length);
-                Ord = idx * _fgtir._totalIndexInterval;
+                this.ord = idx * _fgtir._totalIndexInterval;
 
                 return _fieldIndex.TermsStart + _fieldIndex.TermsDictOffsets.Get(idx);
             }
         }
 
-        protected class FieldIndexData
+        public override bool SupportsOrd
         {
-            public volatile CoreFieldIndex CoreIndex;
+            get { return true; }
+        }
+
+        private class FieldIndexData
+        {
+            // Outer instance
+            private readonly FixedGapTermsIndexReader _fgtir; // LUCENENET TODO: In this assembly, change all variables marked "Outer instance" to be named outerInstance and move them to the beginning of the ctor parameter list
+
+            internal volatile CoreFieldIndex CoreIndex;
 
             private readonly long _indexStart;
             private readonly long _termsStart;
             private readonly long _packedIndexStart;
             private readonly long _packedOffsetsStart;
-            private readonly int _numIndexTerms;
-            private readonly FixedGapTermsIndexReader _fgtir;
 
+            private readonly int _numIndexTerms;
+            
             public FieldIndexData(int numIndexTerms, long indexStart, long termsStart,
                 long packedIndexStart,
                 long packedOffsetsStart, FixedGapTermsIndexReader fgtir)
@@ -372,35 +337,25 @@ namespace Lucene.Net.Codecs.BlockTerms
                         _numIndexTerms, _fgtir);
             }
 
-            public class CoreFieldIndex
+            internal class CoreFieldIndex
             {
                 /// <summary>
                 /// Where this fields term begin in the packed byte[] data
                 /// </summary>
-                public long TermBytesStart { get; private set; }
+                internal long TermBytesStart { get; private set; }
 
                 /// <summary>
                 /// Offset into index TermBytes
                 /// </summary>
-                public PackedInts.Reader TermOffsets { get; private set; }
+                internal PackedInts.Reader TermOffsets { get; private set; }
 
                 /// <summary>
                 /// Index pointers into main terms dict
                 /// </summary>
-                public PackedInts.Reader TermsDictOffsets { get; private set; }
+                internal PackedInts.Reader TermsDictOffsets { get; private set; }
 
-                /// <summary>Returns approximate RAM bytes Used</summary>
-                public long RamBytesUsed
-                {
-                    get
-                    {
-                        return ((TermOffsets != null) ? TermOffsets.RamBytesUsed() : 0) +
-                               ((TermsDictOffsets != null) ? TermsDictOffsets.RamBytesUsed() : 0);
-                    }
-                }
-
-                public int NumIndexTerms { get; private set; }
-                public long TermsStart { get; private set; }
+                internal int NumIndexTerms { get; private set; }
+                internal long TermsStart { get; private set; }
 
                 public CoreFieldIndex(long indexStart, long termsStart, long packedIndexStart, long packedOffsetsStart,
                     int numIndexTerms, FixedGapTermsIndexReader fgtir)
@@ -419,7 +374,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     NumIndexTerms = 1 + (numIndexTerms - 1)/fgtir._indexDivisor;
 
                     Debug.Assert(NumIndexTerms > 0,
-                        String.Format("NumIndexTerms: {0}, IndexDivisor: {1}", NumIndexTerms, fgtir._indexDivisor));
+                        string.Format("NumIndexTerms: {0}, IndexDivisor: {1}", NumIndexTerms, fgtir._indexDivisor));
 
                     if (fgtir._indexDivisor == 1)
                     {
@@ -492,7 +447,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                                 clone.Seek(indexStart + termOffset);
                                 
                                 Debug.Assert(indexStart + termOffset < clone.Length,
-                                    String.Format("IndexStart: {0}, TermOffset: {1}, Len: {2}", indexStart, termOffset,
+                                    string.Format("IndexStart: {0}, TermOffset: {1}, Len: {2}", indexStart, termOffset,
                                         clone.Length));
                                 
                                 Debug.Assert(indexStart + termOffset + numTermBytes < clone.Length);
@@ -524,8 +479,59 @@ namespace Lucene.Net.Codecs.BlockTerms
                     }
                 }
 
+                /// <summary>Returns approximate RAM bytes Used</summary>
+                public long RamBytesUsed // LUCENENET TODO: Make RamBytesUsed()
+                {
+                    get
+                    {
+                        return ((TermOffsets != null) ? TermOffsets.RamBytesUsed() : 0) +
+                               ((TermsDictOffsets != null) ? TermsDictOffsets.RamBytesUsed() : 0);
+                    }
+                }
+            }
+        }
+
+        public override FieldIndexEnum GetFieldEnum(FieldInfo fieldInfo)
+        {
+            FieldIndexData fieldData = _fields[fieldInfo];
+            return fieldData.CoreIndex == null ? null : new IndexEnum(fieldData.CoreIndex, this);
+        }
+
+        public override void Dispose()
+        {
+            if (_input != null && !_indexLoaded)
+            {
+                _input.Dispose();
+            }
+        }
+
+        private void SeekDir(IndexInput input, long dirOffset)
+        {
+            if (_version >= FixedGapTermsIndexWriter.VERSION_CHECKSUM)
+            {
+                input.Seek(input.Length - CodecUtil.FooterLength() - 8);
+                dirOffset = input.ReadLong();
+
+            }
+            else if (_version >= FixedGapTermsIndexWriter.VERSION_APPEND_ONLY)
+            {
+                input.Seek(input.Length - 8);
+                dirOffset = input.ReadLong();
             }
+
+            input.Seek(dirOffset);
         }
 
+        public override long RamBytesUsed
+        {
+            get
+            {
+                var sizeInBytes = ((_termBytes != null) ? _termBytes.RamBytesUsed() : 0) +
+                                  ((_termBytesReader != null) ? _termBytesReader.RamBytesUsed() : 0);
+
+                return _fields.Values.Aggregate(sizeInBytes,
+                    (current, entry) => (current + entry.CoreIndex.RamBytesUsed));
+            }
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
index faf5d1c..74b55d7 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
@@ -37,26 +37,25 @@ namespace Lucene.Net.Codecs.BlockTerms
     /// </summary>
     public class FixedGapTermsIndexWriter : TermsIndexWriterBase
     {
-        protected IndexOutput Output;
+        protected IndexOutput Output; // out
 
-        /** Extension of terms index file */
-        public const String TERMS_INDEX_EXTENSION = "tii";
-        public const String CODEC_NAME = "SIMPLE_STANDARD_TERMS_INDEX";
-        public const int VERSION_START = 0;
-        public const int VERSION_APPEND_ONLY = 1; 
+        /// <summary>Extension of terms index file</summary>
+        internal const string TERMS_INDEX_EXTENSION = "tii";
+        internal const string CODEC_NAME = "SIMPLE_STANDARD_TERMS_INDEX";
+        internal const int VERSION_START = 0;
+        internal const int VERSION_APPEND_ONLY = 1;
+        internal const int VERSION_CHECKSUM = 1000; // 4.x "skipped" trunk's monotonic addressing: give any user a nice exception
+        internal const int VERSION_CURRENT = VERSION_CHECKSUM;
 
-        public const int VERSION_CHECKSUM = 1000;
-
-        // 4.x "skipped" trunk's monotonic addressing: give any user a nice exception
-        public const int VERSION_CURRENT = VERSION_CHECKSUM;
         private readonly int _termIndexInterval;
+
         private readonly List<SimpleFieldWriter> _fields = new List<SimpleFieldWriter>();
 
-        private readonly FieldInfos _fieldInfos;  //@SuppressWarnings("unused") 
+        private readonly FieldInfos _fieldInfos; // unread
 
         public FixedGapTermsIndexWriter(SegmentWriteState state)
         {
-            String indexFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,
+            string indexFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,
                 TERMS_INDEX_EXTENSION);
             _termIndexInterval = state.TermIndexInterval;
             Output = state.Directory.CreateOutput(indexFileName, state.Context);
@@ -94,7 +93,7 @@ namespace Lucene.Net.Codecs.BlockTerms
         /// point order, you must override this method, to simply
         /// return indexedTerm.length.
         /// </remarks>
-        protected int IndexedTermPrefixLength(BytesRef priorTerm, BytesRef indexedTerm)
+        protected virtual int IndexedTermPrefixLength(BytesRef priorTerm, BytesRef indexedTerm)
         {
             // As long as codec sorts terms in unicode codepoint
             // order, we can safely strip off the non-distinguishing
@@ -112,73 +111,17 @@ namespace Lucene.Net.Codecs.BlockTerms
             return Math.Min(1 + priorTerm.Length, indexedTerm.Length);
         }
 
-        public override void Dispose()
-        {
-            if (Output != null)
-            {
-                bool success = false;
-                try
-                {
-                    long dirStart = Output.FilePointer;
-                    int fieldCount = _fields.Count;
-
-                    int nonNullFieldCount = 0;
-                    for (int i = 0; i < fieldCount; i++)
-                    {
-                        SimpleFieldWriter field = _fields[i];
-                        if (field.NumIndexTerms > 0)
-                        {
-                            nonNullFieldCount++;
-                        }
-                    }
-
-                    Output.WriteVInt(nonNullFieldCount);
-                    for (int i = 0; i < fieldCount; i++)
-                    {
-                        SimpleFieldWriter field = _fields[i];
-                        if (field.NumIndexTerms > 0)
-                        {
-                            Output.WriteVInt(field.FieldInfo.Number);
-                            Output.WriteVInt(field.NumIndexTerms);
-                            Output.WriteVLong(field.TermsStart);
-                            Output.WriteVLong(field.IndexStart);
-                            Output.WriteVLong(field.PackedIndexStart);
-                            Output.WriteVLong(field.PackedOffsetsStart);
-                        }
-                    }
-                    WriteTrailer(dirStart);
-                    CodecUtil.WriteFooter(Output);
-                    success = true;
-                }
-                finally
-                {
-                    if (success)
-                    {
-                        IOUtils.Close(Output);
-                    }
-                    else
-                    {
-                        IOUtils.CloseWhileHandlingException(Output);
-                    }
-                    Output = null;
-                }
-            }
-        }
-
-        private void WriteTrailer(long dirStart)
-        {
-            Output.WriteLong(dirStart);
-        }
-
-
         private class SimpleFieldWriter : FieldWriter
         {
-            public readonly FieldInfo FieldInfo;
-            public int NumIndexTerms;
-            public readonly long IndexStart;
-            public readonly long TermsStart;
-            public long PackedIndexStart;
-            public long PackedOffsetsStart;
+            // Outer instance
+            private readonly FixedGapTermsIndexWriter _fgtiw;
+
+            internal readonly FieldInfo FieldInfo;
+            internal int NumIndexTerms;
+            internal readonly long IndexStart;
+            internal readonly long TermsStart;
+            internal long PackedIndexStart;
+            internal long PackedOffsetsStart;
             private long _numTerms;
 
             // TODO: we could conceivably make a PackedInts wrapper
@@ -191,9 +134,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             private readonly BytesRef _lastTerm = new BytesRef();
 
-            private readonly FixedGapTermsIndexWriter _fgtiw;
-
-            public SimpleFieldWriter(FieldInfo fieldInfo, long termsFilePointer, FixedGapTermsIndexWriter fgtiw)
+            internal SimpleFieldWriter(FieldInfo fieldInfo, long termsFilePointer, FixedGapTermsIndexWriter fgtiw)
             {
                 FieldInfo = fieldInfo;
                 IndexStart = fgtiw.Output.FilePointer;
@@ -214,14 +155,14 @@ namespace Lucene.Net.Codecs.BlockTerms
                 // can compute wasted suffix
                 if (0 == _numTerms % _fgtiw._termIndexInterval)
                     _lastTerm.CopyBytes(text);
-                
+
                 return false;
             }
 
             public override void Add(BytesRef text, TermStats stats, long termsFilePointer)
             {
                 int indexedTermLength = _fgtiw.IndexedTermPrefixLength(_lastTerm, text);
-                
+
                 // write only the min prefix that shows the diff
                 // against prior term
                 _fgtiw.Output.WriteBytes(text.Bytes, text.Offset, indexedTermLength);
@@ -250,7 +191,6 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             public override void Finish(long termsFilePointer)
             {
-
                 // write primary terms dict offsets
                 PackedIndexStart = _fgtiw.Output.FilePointer;
 
@@ -287,5 +227,63 @@ namespace Lucene.Net.Codecs.BlockTerms
                 _termsPointerDeltas = null;
             }
         }
+
+        public override void Dispose()
+        {
+            if (Output != null)
+            {
+                bool success = false;
+                try
+                {
+                    long dirStart = Output.FilePointer;
+                    int fieldCount = _fields.Count;
+
+                    int nonNullFieldCount = 0;
+                    for (int i = 0; i < fieldCount; i++)
+                    {
+                        SimpleFieldWriter field = _fields[i];
+                        if (field.NumIndexTerms > 0)
+                        {
+                            nonNullFieldCount++;
+                        }
+                    }
+
+                    Output.WriteVInt(nonNullFieldCount);
+                    for (int i = 0; i < fieldCount; i++)
+                    {
+                        SimpleFieldWriter field = _fields[i];
+                        if (field.NumIndexTerms > 0)
+                        {
+                            Output.WriteVInt(field.FieldInfo.Number);
+                            Output.WriteVInt(field.NumIndexTerms);
+                            Output.WriteVLong(field.TermsStart);
+                            Output.WriteVLong(field.IndexStart);
+                            Output.WriteVLong(field.PackedIndexStart);
+                            Output.WriteVLong(field.PackedOffsetsStart);
+                        }
+                    }
+                    WriteTrailer(dirStart);
+                    CodecUtil.WriteFooter(Output);
+                    success = true;
+                }
+                finally
+                {
+                    if (success)
+                    {
+                        IOUtils.Close(Output);
+                    }
+                    else
+                    {
+                        IOUtils.CloseWhileHandlingException(Output);
+                    }
+                    Output = null;
+                }
+            }
+        }
+
+        private void WriteTrailer(long dirStart)
+        {
+            Output.WriteLong(dirStart);
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
index 7747e91..bf19dc1 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
@@ -39,17 +39,14 @@ namespace Lucene.Net.Codecs.BlockTerms
     /// </summary>
     public abstract class TermsIndexReaderBase : IDisposable
     {
-        public abstract bool SupportsOrd { get; }
-
-        public abstract int Divisor { get; }
-
-        /// <summary>Returns approximate RAM bytes used</summary>
-        public abstract long RamBytesUsed { get; }
-
         public abstract FieldIndexEnum GetFieldEnum(FieldInfo fieldInfo);
 
         public abstract void Dispose();
 
+        public abstract bool SupportsOrd { get; }
+
+        public abstract int Divisor { get; }
+
         /// <summary>
         /// Similar to TermsEnum, except, the only "metadata" it
         /// reports for a given indexed term is the long fileOffset
@@ -57,30 +54,32 @@ namespace Lucene.Net.Codecs.BlockTerms
         /// </summary>
         public abstract class FieldIndexEnum
         {
-            /** Returns -1 at end */
-            public abstract long? Next { get; }
+            /// <summary> 
+            /// Seeks to "largest" indexed term that's less than or equal
+            /// to term; returns file pointer index (into the main
+            /// terms index file) for that term 
+            /// </summary>
+            public abstract long? Seek(BytesRef term); // LUCENENET TODO: make non-null
+
+            /// <summary>Returns -1 at end</summary>
+            public abstract long? Next { get; } // LUCENENET TODO: Make Next(), make non-null
 
-            public abstract BytesRef Term { get; set; }
+            public abstract BytesRef Term { get; }
 
             /// <summary></summary>
             /// <remarks>Only implemented if {@link TermsIndexReaderBase.supportsOrd()} 
             /// returns true</remarks>
             /// <returns></returns>
-            public abstract long Ord { get; set; }
+            public abstract long? Seek(long ord); // LUCENENET TODO: make non-null
 
             /// <summary></summary>
             /// <remarks>Only implemented if {@link TermsIndexReaderBase.supportsOrd()} 
             /// returns true</remarks>
             /// <returns></returns>
-            public abstract long? Seek(long ord);
-        
-            /// <summary> 
-            /// Seeks to "largest" indexed term that's less than or equal
-            /// to term; returns file pointer index (into the main
-            /// terms index file) for that term 
-            /// </summary>
-            public abstract long? Seek(BytesRef term);
+            public abstract long Ord { get; }
         }
 
+        /// <summary>Returns approximate RAM bytes used</summary>
+        public abstract long RamBytesUsed { get; } // LUCENENET TODO: Make RamBytesUsed()
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/BlockTerms/TermsIndexWriterBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexWriterBase.cs b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexWriterBase.cs
index 76c5973..e3efbcd 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexWriterBase.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexWriterBase.cs
@@ -30,11 +30,6 @@ namespace Lucene.Net.Codecs.BlockTerms
     /// </summary>
     public abstract class TermsIndexWriterBase : IDisposable
     {
-
-        public abstract FieldWriter AddField(FieldInfo fieldInfo, long termsFilePointer);
-
-        public abstract void Dispose();
-
         /// <summary>Terms index API for a single field</summary>
         public abstract class FieldWriter
         {
@@ -42,5 +37,9 @@ namespace Lucene.Net.Codecs.BlockTerms
             public abstract void Add(BytesRef text, TermStats stats, long termsFilePointer);
             public abstract void Finish(long termsFilePointer);
         }
+
+        public abstract FieldWriter AddField(FieldInfo fieldInfo, long termsFilePointer);
+
+        public abstract void Dispose(); // LUCENENET TODO: Implement disposable pattern
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
index e326f15..48eaf86 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
@@ -34,30 +34,34 @@ namespace Lucene.Net.Codecs.BlockTerms
     /// </summary>
     public class VariableGapTermsIndexReader : TermsIndexReaderBase
     {
+        private readonly PositiveIntOutputs _fstOutputs = PositiveIntOutputs.Singleton;
         private readonly int _indexDivisor;
-        private readonly IndexInput _input;       // Closed if indexLoaded is true:
-        private readonly int _version;
 
+        private readonly IndexInput _input;       // Closed if indexLoaded is true:
         private volatile bool _indexLoaded;
-        private long _dirOffset;                 // start of the field info data
 
-        private readonly PositiveIntOutputs _fstOutputs = PositiveIntOutputs.Singleton;
         private readonly Dictionary<FieldInfo, FieldIndexData> _fields = new Dictionary<FieldInfo, FieldIndexData>();
+
+        private long _dirOffset;                 // start of the field info data
+
+        private readonly int _version;
+
+        private readonly string segment;
         
-        public VariableGapTermsIndexReader(Directory dir, FieldInfos fieldInfos, String segment, int indexDivisor,
-            String segmentSuffix, IOContext context)
+        public VariableGapTermsIndexReader(Directory dir, FieldInfos fieldInfos, string segment, int indexDivisor,
+            string segmentSuffix, IOContext context)
         {
             _input =
                 dir.OpenInput(
                     IndexFileNames.SegmentFileName(segment, segmentSuffix,
                         VariableGapTermsIndexWriter.TERMS_INDEX_EXTENSION), new IOContext(context, true));
+            this.segment = segment;
             var success = false;
 
             Debug.Assert(indexDivisor == -1 || indexDivisor > 0);
 
             try
             {
-
                 _version = ReadHeader(_input);
                 _indexDivisor = indexDivisor;
 
@@ -85,7 +89,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     }
                     catch (ArgumentException)
                     {
-                        throw new CorruptIndexException(String.Format("Duplicate Field: {0}, Resource: {1}",
+                        throw new CorruptIndexException(string.Format("Duplicate Field: {0}, Resource: {1}",
                             fieldInfo.Name, _input));
                     }
                 }
@@ -105,6 +109,11 @@ namespace Lucene.Net.Codecs.BlockTerms
             }
         }
 
+        public override int Divisor
+        {
+            get { return _indexDivisor; }
+        }
+
         private int ReadHeader(IndexInput input)
         {
             int version = CodecUtil.CheckHeader(input, VariableGapTermsIndexWriter.CODEC_NAME,
@@ -116,57 +125,64 @@ namespace Lucene.Net.Codecs.BlockTerms
             return version;
         }
 
-        public override void Dispose()
+        private class IndexEnum : FieldIndexEnum
         {
-            if (_input != null && !_indexLoaded) { 
-                _input.Dispose(); 
-            } 
-        }
+            private readonly BytesRefFSTEnum<long?> _fstEnum;
+            private BytesRefFSTEnum.InputOutput<long?> _current;
 
-        public override bool SupportsOrd
-        {
-            get { return false; }
-        }
-        
-        public override int Divisor
-        {
-            get { return _indexDivisor; }
-        }
+            public IndexEnum(FST<long?> fst)
+            {
+                _fstEnum = new BytesRefFSTEnum<long?>(fst);
+            }
 
-        public override FieldIndexEnum GetFieldEnum(FieldInfo fieldInfo)
-        {
-            FieldIndexData fieldData = _fields[fieldInfo];
-            return fieldData.Fst == null ? null : new IndexEnum(fieldData.Fst);
-        }
+            public override BytesRef Term
+            {
+                get { return _current == null ? null : _current.Input; }
+            }
 
-        private void SeekDir(IndexInput input, long dirOffset)
-        {
-            if (_version >= VariableGapTermsIndexWriter.VERSION_CHECKSUM)
+            public override long? Seek(BytesRef target)
             {
-                input.Seek(input.Length - CodecUtil.FooterLength() - 8);
-                dirOffset = input.ReadLong();
+                _current = _fstEnum.SeekFloor(target);
+                return _current.Output;
             }
-            else if (_version >= VariableGapTermsIndexWriter.VERSION_APPEND_ONLY)
+
+            public override long? Next
             {
-                input.Seek(input.Length - 8);
-                dirOffset = input.ReadLong();
+                get
+                {
+                    _current = _fstEnum.Next();
+                    if (_current == null)
+                        return -1;
+
+                    return _current.Output;
+                }
+            }
+
+            public override long Ord
+            {
+                get { throw new NotImplementedException(); }
+            }
+
+            public override long? Seek(long ord)
+            {
+                throw new NotImplementedException();
             }
-            input.Seek(dirOffset);
         }
 
-        public override long RamBytesUsed
+        public override bool SupportsOrd
         {
-            get { return _fields.Values.Sum(entry => entry.RamBytesUsed()); }
+            get { return false; }
         }
 
-        internal class FieldIndexData
+        private class FieldIndexData
         {
+            // Outer instance
+            private readonly VariableGapTermsIndexReader _vgtir;
 
             private readonly long _indexStart;
             // Set only if terms index is loaded:
-            public volatile FST<long?> Fst;
-            private readonly VariableGapTermsIndexReader _vgtir;
-
+            internal volatile FST<long?> Fst;
+            
             public FieldIndexData(long indexStart, VariableGapTermsIndexReader vgtir)
             {
                 _vgtir = vgtir;
@@ -180,7 +196,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 if (Fst != null) return;
 
-                var clone = (IndexInput) _vgtir._input.Clone();
+                var clone = (IndexInput)_vgtir._input.Clone();
                 clone.Seek(_indexStart);
                 Fst = new FST<long?>(clone, _vgtir._fstOutputs);
                 clone.Dispose();
@@ -201,7 +217,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     var builder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, outputs);
                     var fstEnum = new BytesRefFSTEnum<long?>(Fst);
                     var count = _vgtir._indexDivisor;
-                        
+
                     BytesRefFSTEnum.InputOutput<long?> result;
                     while ((result = fstEnum.Next()) != null)
                     {
@@ -217,57 +233,43 @@ namespace Lucene.Net.Codecs.BlockTerms
             }
 
             /// <summary>Returns approximate RAM bytes used</summary>
-            public long RamBytesUsed()
+            public virtual long RamBytesUsed()
             {
                 return Fst == null ? 0 : Fst.SizeInBytes();
             }
         }
 
-        protected class IndexEnum : FieldIndexEnum
+        public override FieldIndexEnum GetFieldEnum(FieldInfo fieldInfo)
         {
-            private readonly BytesRefFSTEnum<long?> _fstEnum;
-            private BytesRefFSTEnum.InputOutput<long?> _current;
-
-            public IndexEnum(FST<long?> fst)
-            {
-                _fstEnum = new BytesRefFSTEnum<long?>(fst);
-            }
-
-            public override BytesRef Term
-            {
-                get { return _current == null ? null : _current.Input; }
-                set { }
-            }
-
-            public override long? Seek(BytesRef target)
-            {
-                _current = _fstEnum.SeekFloor(target);
-                return _current.Output;
-            }
-
-            public override long? Next
-            {
-                get
-                {
-                    _current = _fstEnum.Next();
-                    if (_current == null)
-                        return -1;
+            FieldIndexData fieldData = _fields[fieldInfo];
+            return fieldData.Fst == null ? null : new IndexEnum(fieldData.Fst);
+        }
 
-                    return _current.Output;
-                }
-            }
+        public override void Dispose()
+        {
+            if (_input != null && !_indexLoaded) { 
+                _input.Dispose(); 
+            } 
+        }
 
-            public override long Ord
+        private void SeekDir(IndexInput input, long dirOffset)
+        {
+            if (_version >= VariableGapTermsIndexWriter.VERSION_CHECKSUM)
             {
-                get { throw new NotImplementedException(); }
-                set { }
+                input.Seek(input.Length - CodecUtil.FooterLength() - 8);
+                dirOffset = input.ReadLong();
             }
-
-            public override long? Seek(long ord)
+            else if (_version >= VariableGapTermsIndexWriter.VERSION_APPEND_ONLY)
             {
-                throw new NotImplementedException();
+                input.Seek(input.Length - 8);
+                dirOffset = input.ReadLong();
             }
+            input.Seek(dirOffset);
         }
 
+        public override long RamBytesUsed
+        {
+            get { return _fields.Values.Sum(entry => entry.RamBytesUsed()); }
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
index cda8851..c172433 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
@@ -38,17 +38,18 @@ namespace Lucene.Net.Codecs.BlockTerms
     /// </summary>
     public class VariableGapTermsIndexWriter : TermsIndexWriterBase
     {
-        protected IndexOutput Output;
+        protected IndexOutput Output; // out
 
         /** Extension of terms index file */
-        public const String TERMS_INDEX_EXTENSION = "tiv";
-        public const String CODEC_NAME = "VARIABLE_GAP_TERMS_INDEX";
-        public const int VERSION_START = 0;
-        public const int VERSION_APPEND_ONLY = 1;
-        public const int VERSION_CHECKSUM = 2;
-        public const int VERSION_CURRENT = VERSION_CHECKSUM;
+        internal const string TERMS_INDEX_EXTENSION = "tiv";
+        internal const string CODEC_NAME = "VARIABLE_GAP_TERMS_INDEX";
+        internal const int VERSION_START = 0;
+        internal const int VERSION_APPEND_ONLY = 1;
+        internal const int VERSION_CHECKSUM = 2;
+        internal const int VERSION_CURRENT = VERSION_CHECKSUM;
 
         private readonly List<FstFieldWriter> _fields = new List<FstFieldWriter>();
+
         private readonly IndexTermSelector _policy;
 
         /// <summary>
@@ -74,14 +75,14 @@ namespace Lucene.Net.Codecs.BlockTerms
         /// <remarks>
         /// Same policy as {@link FixedGapTermsIndexWriter}
         /// </remarks>
-        public class EveryNTermSelector : IndexTermSelector
+        public sealed class EveryNTermSelector : IndexTermSelector
         {
             private int _count;
             private readonly int _interval;
 
             public EveryNTermSelector(int interval)
             {
-                _interval = interval;
+                this._interval = interval;
                 _count = interval; // First term is first indexed term
             }
 
@@ -108,7 +109,7 @@ namespace Lucene.Net.Codecs.BlockTerms
         /// every interval terms.  This should reduce seek time
         /// to high docFreq terms. 
         /// </summary>
-        public class EveryNOrDocFreqTermSelector : IndexTermSelector
+        public sealed class EveryNOrDocFreqTermSelector : IndexTermSelector
         {
             private int _count;
             private readonly int _docFreqThresh;
@@ -192,7 +193,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             }
         }
 
-        private static void WriteHeader(IndexOutput output)
+        private void WriteHeader(IndexOutput output)
         {
             CodecUtil.WriteHeader(output, CODEC_NAME, VERSION_CURRENT);
         }
@@ -209,7 +210,7 @@ namespace Lucene.Net.Codecs.BlockTerms
         /// Note: If your codec does not sort in unicode code point order,
         /// you must override this method to simplly return IndexedTerm.Length
         /// </remarks>
-        protected int IndexedTermPrefixLength(BytesRef priorTerm, BytesRef indexedTerm)
+        protected virtual int IndexedTermPrefixLength(BytesRef priorTerm, BytesRef indexedTerm)
         {
             // As long as codec sorts terms in unicode codepoint
             // order, we can safely strip off the non-distinguishing
@@ -231,17 +232,19 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class FstFieldWriter : FieldWriter
         {
+            // Outer instance
+            private readonly VariableGapTermsIndexWriter _vgtiw;
+
             private readonly Builder<long?> _fstBuilder;
+            private readonly PositiveIntOutputs fstOutputs;
             private readonly long _startTermsFilePointer;
-            private readonly BytesRef _lastTerm = new BytesRef();
-            private readonly IntsRef _scratchIntsRef = new IntsRef();
-            private readonly VariableGapTermsIndexWriter _vgtiw;
 
-            private bool _first = true;
+            internal FieldInfo FieldInfo { get; private set; }
+            internal FST<long?> Fst { get; private set; }
+            internal long IndexStart { get; private set; }
 
-            public long IndexStart { get; private set; }
-            public FieldInfo FieldInfo { get; private set; }
-            public FST<long?> Fst { get; private set; }
+            private readonly BytesRef _lastTerm = new BytesRef();
+            private bool _first = true;
 
             public FstFieldWriter(FieldInfo fieldInfo, long termsFilePointer, VariableGapTermsIndexWriter vgtiw)
             {
@@ -265,11 +268,13 @@ namespace Lucene.Net.Codecs.BlockTerms
                     _first = false;
                     return true;
                 }
-            
+
                 _lastTerm.CopyBytes(text);
                 return false;
             }
 
+            private readonly IntsRef _scratchIntsRef = new IntsRef();
+
             public override void Add(BytesRef text, TermStats stats, long termsFilePointer)
             {
                 if (text.Length == 0)
@@ -342,7 +347,5 @@ namespace Lucene.Net.Codecs.BlockTerms
         {
             Output.WriteLong(dirStart);
         }
-
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Bloom/BloomFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilterFactory.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilterFactory.cs
index d443f6e..4dab212 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilterFactory.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilterFactory.cs
@@ -28,7 +28,6 @@ namespace Lucene.Net.Codecs.Bloom
     /// </summary>
     public abstract class BloomFilterFactory
     {
-
         /// <summary>
         /// 
         /// </summary>
@@ -43,7 +42,7 @@ namespace Lucene.Net.Codecs.Bloom
         /// <param name="fieldInfo">The field with sparse set bits</param>
         /// <param name="initialSet">The bits accumulated</param>
         /// <returns> null or a hopefully more densely packed, smaller bitset</returns>
-        public FuzzySet Downsize(FieldInfo fieldInfo, FuzzySet initialSet)
+        public virtual FuzzySet Downsize(FieldInfo fieldInfo, FuzzySet initialSet)
         {
             // Aim for a bitset size that would have 10% of bits set (so 90% of searches
             // would fail-fast)
@@ -58,6 +57,5 @@ namespace Lucene.Net.Codecs.Bloom
         /// <param name="fieldInfo">The field with which this filter is associated</param>
         /// <returns>true if the set has reached saturation and should be retired</returns>
         public abstract bool IsSaturated(FuzzySet bloomFilter, FieldInfo fieldInfo);
-
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
index 0e717c6..1133abe 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -61,13 +61,13 @@ namespace Lucene.Net.Codecs.Bloom
     /// </summary>
     public sealed class BloomFilteringPostingsFormat : PostingsFormat
     {
-        public static readonly String BLOOM_CODEC_NAME = "BloomFilter";
+        public static readonly string BLOOM_CODEC_NAME = "BloomFilter";
         public static readonly int VERSION_START = 1;
         public static readonly int VERSION_CHECKSUM = 2;
         public static readonly int VERSION_CURRENT = VERSION_CHECKSUM;
 
-        /** Extension of Bloom Filters file */
-        private const String BLOOM_EXTENSION = "blm";
+        /// <summary>Extension of Bloom Filters file</summary>
+        private const string BLOOM_EXTENSION = "blm";
 
         private readonly BloomFilterFactory _bloomFilterFactory = new DefaultBloomFilterFactory();
         private readonly PostingsFormat _delegatePostingsFormat;
@@ -105,7 +105,8 @@ namespace Lucene.Net.Codecs.Bloom
         /// Used only by core Lucene at read-time via Service Provider instantiation -
         /// do not use at Write-time in application code.
         /// </summary>
-        public BloomFilteringPostingsFormat() : base(BLOOM_CODEC_NAME)
+        public BloomFilteringPostingsFormat() 
+            : base(BLOOM_CODEC_NAME)
         {
         }
 
@@ -127,11 +128,10 @@ namespace Lucene.Net.Codecs.Bloom
         internal class BloomFilteredFieldsProducer : FieldsProducer
         {
             private readonly FieldsProducer _delegateFieldsProducer;
-            private readonly HashMap<String, FuzzySet> _bloomsByFieldName = new HashMap<String, FuzzySet>();
+            private readonly HashMap<string, FuzzySet> _bloomsByFieldName = new HashMap<string, FuzzySet>();
 
             public BloomFilteredFieldsProducer(SegmentReadState state)
             {
-
                 var bloomFileName = IndexFileNames.SegmentFileName(
                     state.SegmentInfo.Name, state.SegmentSuffix, BLOOM_EXTENSION);
                 ChecksumIndexInput bloomIn = null;
@@ -184,7 +184,12 @@ namespace Lucene.Net.Codecs.Bloom
                 return _delegateFieldsProducer.GetEnumerator();
             }
 
-            public override Terms Terms(String field)
+            public override void Dispose()
+            {
+                _delegateFieldsProducer.Dispose();
+            }
+
+            public override Terms Terms(string field)
             {
                 var filter = _bloomsByFieldName[field];
                 if (filter == null)
@@ -198,39 +203,16 @@ namespace Lucene.Net.Codecs.Bloom
             {
                 get
                 {
-                    {
-                        return _delegateFieldsProducer.Count;
-                    }
+                    return _delegateFieldsProducer.Count;
                 }
             }
 
-            [Obsolete("iterate fields and add their size() instead.")]
+            [Obsolete("iterate fields and add their Count instead.")]
             public override long UniqueTermCount
             {
                 get { return _delegateFieldsProducer.UniqueTermCount; }
             }
 
-            public override void Dispose()
-            {
-                _delegateFieldsProducer.Dispose();
-            }
-
-            public override long RamBytesUsed()
-            {
-                var sizeInBytes = ((_delegateFieldsProducer != null) ? _delegateFieldsProducer.RamBytesUsed() : 0);
-                foreach (var entry in _bloomsByFieldName.EntrySet())
-                {
-                    sizeInBytes += entry.Key.Length*RamUsageEstimator.NUM_BYTES_CHAR;
-                    sizeInBytes += entry.Value.RamBytesUsed();
-                }
-                return sizeInBytes;
-            }
-
-            public override void CheckIntegrity()
-            {
-                _delegateFieldsProducer.CheckIntegrity();
-            }
-
             internal class BloomFilteredTerms : Terms
             {
                 private readonly Terms _delegateTerms;
@@ -316,13 +298,13 @@ namespace Lucene.Net.Codecs.Bloom
                 private Terms _delegateTerms;
                 internal TermsEnum DELEGATE_TERMS_ENUM;
                 private TermsEnum _reuseDelegate;
-                internal readonly FuzzySet FILTER;
+                internal readonly FuzzySet FILTER; // LUCENENET TODO: rename filter
 
                 public BloomFilteredTermsEnum(Terms delegateTerms, TermsEnum reuseDelegate, FuzzySet filter)
                 {
                     _delegateTerms = delegateTerms;
                     _reuseDelegate = reuseDelegate;
-                    FILTER = filter;
+                    this.FILTER = filter;
                 }
 
                 internal void Reset(Terms delegateTerms, TermsEnum reuseDelegate)
@@ -341,17 +323,17 @@ namespace Lucene.Net.Codecs.Bloom
                     return DELEGATE_TERMS_ENUM ?? (DELEGATE_TERMS_ENUM = _delegateTerms.GetIterator(_reuseDelegate));
                 }
 
-                public override BytesRef Next()
+                public override sealed BytesRef Next()
                 {
                     return Delegate().Next();
                 }
 
-                public override IComparer<BytesRef> Comparer
+                public override sealed IComparer<BytesRef> Comparer
                 {
                     get { return _delegateTerms.Comparer; }
                 }
 
-                public override bool SeekExact(BytesRef text)
+                public override sealed bool SeekExact(BytesRef text)
                 {
                     // The magical fail-fast speed up that is the entire point of all of
                     // this code - save a disk seek if there is a match on an in-memory
@@ -365,32 +347,32 @@ namespace Lucene.Net.Codecs.Bloom
                     return Delegate().SeekExact(text);
                 }
 
-                public override SeekStatus SeekCeil(BytesRef text)
+                public override sealed SeekStatus SeekCeil(BytesRef text)
                 {
                     return Delegate().SeekCeil(text);
                 }
 
-                public override void SeekExact(long ord)
+                public override sealed void SeekExact(long ord)
                 {
                     Delegate().SeekExact(ord);
                 }
 
-                public override BytesRef Term
+                public override sealed BytesRef Term
                 {
                     get { return Delegate().Term; }
                 }
 
-                public override long Ord
+                public override sealed long Ord
                 {
                     get { return Delegate().Ord; }
                 }
 
-                public override int DocFreq
+                public override sealed int DocFreq
                 {
                     get { return Delegate().DocFreq; }
                 }
 
-                public override long TotalTermFreq
+                public override sealed long TotalTermFreq
                 {
                     get { return Delegate().TotalTermFreq; }
                 }
@@ -407,15 +389,32 @@ namespace Lucene.Net.Codecs.Bloom
                 }
             }
 
+            public override long RamBytesUsed()
+            {
+                var sizeInBytes = ((_delegateFieldsProducer != null) ? _delegateFieldsProducer.RamBytesUsed() : 0);
+                foreach (var entry in _bloomsByFieldName.EntrySet())
+                {
+                    sizeInBytes += entry.Key.Length * RamUsageEstimator.NUM_BYTES_CHAR;
+                    sizeInBytes += entry.Value.RamBytesUsed();
+                }
+                return sizeInBytes;
+            }
+
+            public override void CheckIntegrity()
+            {
+                _delegateFieldsProducer.CheckIntegrity();
+            }
         }
 
         internal class BloomFilteredFieldsConsumer : FieldsConsumer
         {
+            // Outer instance
+            private readonly BloomFilteringPostingsFormat _bfpf;
+
             private readonly FieldsConsumer _delegateFieldsConsumer;
             private readonly Dictionary<FieldInfo, FuzzySet> _bloomFilters = new Dictionary<FieldInfo, FuzzySet>();
             private readonly SegmentWriteState _state;
-            private readonly BloomFilteringPostingsFormat _bfpf;
-
+            
             public BloomFilteredFieldsConsumer(FieldsConsumer fieldsConsumer,
                 SegmentWriteState state, BloomFilteringPostingsFormat bfpf)
             {
@@ -480,13 +479,11 @@ namespace Lucene.Net.Codecs.Bloom
             private void SaveAppropriatelySizedBloomFilter(DataOutput bloomOutput,
                 FuzzySet bloomFilter, FieldInfo fieldInfo)
             {
-
                 var rightSizedSet = _bfpf._bloomFilterFactory.Downsize(fieldInfo,
                     bloomFilter) ?? bloomFilter;
 
                 rightSizedSet.Serialize(bloomOutput);
             }
-
         }
 
         internal class WrappedTermsConsumer : TermsConsumer
@@ -524,8 +521,6 @@ namespace Lucene.Net.Codecs.Bloom
             {
                 get { return _delegateTermsConsumer.Comparer; }
             }
-
         }
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Bloom/DefaultBloomFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/DefaultBloomFilterFactory.cs b/src/Lucene.Net.Codecs/Bloom/DefaultBloomFilterFactory.cs
index 3e49add..f3e0722 100644
--- a/src/Lucene.Net.Codecs/Bloom/DefaultBloomFilterFactory.cs
+++ b/src/Lucene.Net.Codecs/Bloom/DefaultBloomFilterFactory.cs
@@ -27,7 +27,6 @@ namespace Lucene.Net.Codecs.Bloom
     /// </summary>
     public class DefaultBloomFilterFactory : BloomFilterFactory
     {
-
         public override FuzzySet GetSetForField(SegmentWriteState state, FieldInfo info)
         {
             //Assume all of the docs have a unique term (e.g. a primary key) and we hope to maintain a set with 10% of bits set
@@ -40,6 +39,5 @@ namespace Lucene.Net.Codecs.Bloom
             // throw any more memory at this problem.
             return bloomFilter.GetSaturation() > 0.9f;
         }
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs b/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
index d107cb0..16e1104 100644
--- a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
+++ b/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
@@ -45,7 +45,6 @@ namespace Lucene.Net.Codecs.Bloom
     /// </summary>
     public class FuzzySet
     {
-
         public static readonly int VERSION_SPI = 1; // HashFunction used to be loaded through a SPI
         public static readonly int VERSION_START = VERSION_SPI;
         public static readonly int VERSION_CURRENT = 2;
@@ -70,7 +69,7 @@ namespace Lucene.Net.Codecs.Bloom
         /// </remarks>
         public enum ContainsResult
         {
-            Maybe,
+            Maybe, // LUCENENET TODO: Change to MAYBE, NO
             No
         };
 
@@ -87,27 +86,16 @@ namespace Lucene.Net.Codecs.Bloom
         // translation of the query term that mirrors the stored content's reprojections.
         private static int[] _usableBitSetSizes;
 
-        private static int[] UsableBitSetSizes
-        {
-            get
-            {
-                if (_usableBitSetSizes == null)
-                    InitializeUsableBitSetSizes();
-
-                return _usableBitSetSizes;
-            }
-            set { _usableBitSetSizes = value; }
-        }
 
-        private static void InitializeUsableBitSetSizes()
+        static FuzzySet()
         {
-            UsableBitSetSizes = new int[30];
+            _usableBitSetSizes = new int[30];
             const int mask = 1;
             var size = mask;
-            for (var i = 0; i < UsableBitSetSizes.Length; i++)
+            for (var i = 0; i < _usableBitSetSizes.Length; i++)
             {
                 size = (size << 1) | mask;
-                UsableBitSetSizes[i] = size;
+                _usableBitSetSizes[i] = size;
             }
         }
 
@@ -118,8 +106,8 @@ namespace Lucene.Net.Codecs.Bloom
         /// </summary>
         public static int GetNearestSetSize(int maxNumberOfBits)
         {
-            var result = UsableBitSetSizes[0];
-            foreach (var t in UsableBitSetSizes.Where(t => t <= maxNumberOfBits))
+            var result = _usableBitSetSizes[0];
+            foreach (var t in _usableBitSetSizes.Where(t => t <= maxNumberOfBits))
             {
                 result = t;
             }
@@ -138,7 +126,9 @@ namespace Lucene.Net.Codecs.Bloom
         {
             // Iterate around the various scales of bitset from smallest to largest looking for the first that
             // satisfies value volumes at the chosen saturation level
-            foreach (var t in from t in UsableBitSetSizes let numSetBitsAtDesiredSaturation = (int) (t*desiredSaturation) let estimatedNumUniqueValues = GetEstimatedNumberUniqueValuesAllowingForCollisions(
+            foreach (var t in from t in _usableBitSetSizes
+                              let numSetBitsAtDesiredSaturation = (int) (t*desiredSaturation)
+                              let estimatedNumUniqueValues = GetEstimatedNumberUniqueValuesAllowingForCollisions(
                 t, numSetBitsAtDesiredSaturation) where estimatedNumUniqueValues > maxNumberOfValuesExpected select t)
             {
                 return t;
@@ -170,7 +160,7 @@ namespace Lucene.Net.Codecs.Bloom
         /// Unlike a conventional set, the fuzzy set returns NO or MAYBE rather than true or false.
         /// </summary>
         /// <returns>NO or MAYBE</returns>
-        public ContainsResult Contains(BytesRef value)
+        public virtual ContainsResult Contains(BytesRef value)
         {
             var hash = _hashFunction.Hash(value);
             if (hash < 0)
@@ -198,7 +188,7 @@ namespace Lucene.Net.Codecs.Bloom
         ///  @param out Data output stream
         ///  @ If there is a low-level I/O error
         /// </summary>
-        public void Serialize(DataOutput output)
+        public virtual void Serialize(DataOutput output)
         {
             output.WriteInt(VERSION_CURRENT);
             output.WriteInt(_bloomSize);
@@ -244,7 +234,7 @@ namespace Lucene.Net.Codecs.Bloom
         /// chosen size of the internal bitset.
         /// </summary>
         /// <param name="value">The Key value to be hashed</param>
-        public void AddValue(BytesRef value)
+        public virtual void AddValue(BytesRef value)
         {
             var hash = _hashFunction.Hash(value);
             if (hash < 0)
@@ -261,14 +251,16 @@ namespace Lucene.Net.Codecs.Bloom
         /// Lower values have better accuracy but require more space.
         /// </param>
         /// <return>A smaller FuzzySet or null if the current set is already over-saturated</return>
-        public FuzzySet Downsize(float targetMaxSaturation)
+        public virtual FuzzySet Downsize(float targetMaxSaturation)
         {
             var numBitsSet = _filter.Cardinality();
             FixedBitSet rightSizedBitSet;
             var rightSizedBitSetSize = _bloomSize;
             //Hopefully find a smaller size bitset into which we can project accumulated values while maintaining desired saturation level
-            foreach (var candidateBitsetSize in from candidateBitsetSize in UsableBitSetSizes let candidateSaturation = numBitsSet
-                                                                                                                         /(float) candidateBitsetSize where candidateSaturation <= targetMaxSaturation select candidateBitsetSize)
+            foreach (var candidateBitsetSize in from candidateBitsetSize in _usableBitSetSizes
+                                                let candidateSaturation = numBitsSet /(float) candidateBitsetSize
+                                                where candidateSaturation <= targetMaxSaturation
+                                                select candidateBitsetSize)
             {
                 rightSizedBitSetSize = candidateBitsetSize;
                 break;
@@ -299,7 +291,7 @@ namespace Lucene.Net.Codecs.Bloom
             return new FuzzySet(rightSizedBitSet, rightSizedBitSetSize, _hashFunction);
         }
 
-        public int GetEstimatedUniqueValues()
+        public virtual int GetEstimatedUniqueValues()
         {
             return GetEstimatedNumberUniqueValuesAllowingForCollisions(_bloomSize, _filter.Cardinality());
         }
@@ -315,13 +307,13 @@ namespace Lucene.Net.Codecs.Bloom
             return (int) (setSizeAsDouble*logInverseSaturation);
         }
 
-        public float GetSaturation()
+        public virtual float GetSaturation()
         {
             var numBitsSet = _filter.Cardinality();
             return numBitsSet/(float) _bloomSize;
         }
 
-        public long RamBytesUsed()
+        public virtual long RamBytesUsed()
         {
             return RamUsageEstimator.SizeOf(_filter.GetBits());
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Bloom/HashFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/HashFunction.cs b/src/Lucene.Net.Codecs/Bloom/HashFunction.cs
index af1a608..facee5b 100644
--- a/src/Lucene.Net.Codecs/Bloom/HashFunction.cs
+++ b/src/Lucene.Net.Codecs/Bloom/HashFunction.cs
@@ -35,6 +35,5 @@ namespace Lucene.Net.Codecs.Bloom
         /// @return the hash of the bytes referenced by bytes.offset and length bytes.length
         /// </summary>
         public abstract int Hash(BytesRef bytes);
-
     }
 }
\ No newline at end of file


[28/37] lucenenet git commit: Lucene.Net.Tests.Codecs: Added API consistency tests

Posted by ni...@apache.org.
Lucene.Net.Tests.Codecs: Added API consistency tests


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

Branch: refs/heads/api-work
Commit: fcb98916776f0a2b3d6f1a91176a42e9db49e314
Parents: e65864e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 17:24:38 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:24:38 2017 +0700

----------------------------------------------------------------------
 .../Lucene.Net.Tests.Codecs.csproj              |   1 +
 .../TestApiConsistency.cs                       | 108 +++++++++++++++++++
 2 files changed, 109 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcb98916/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index 16c1db9..7e4c447 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -62,6 +62,7 @@
     <Compile Include="SimpleText\TestSimpleTextPostingsFormat.cs" />
     <Compile Include="SimpleText\TestSimpleTextStoredFieldsFormat.cs" />
     <Compile Include="SimpleText\TestSimpleTextTermVectorsFormat.cs" />
+    <Compile Include="TestApiConsistency.cs" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\Lucene.Net.Analysis.Common\Lucene.Net.Analysis.Common.csproj">

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fcb98916/src/Lucene.Net.Tests.Codecs/TestApiConsistency.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/TestApiConsistency.cs b/src/Lucene.Net.Tests.Codecs/TestApiConsistency.cs
new file mode 100644
index 0000000..0268028
--- /dev/null
+++ b/src/Lucene.Net.Tests.Codecs/TestApiConsistency.cs
@@ -0,0 +1,108 @@
+\ufeffusing Lucene.Net.Attributes;
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.Codecs.Tests
+{
+    /// <summary>
+    /// LUCENENET specific tests for ensuring API conventions are followed
+    /// </summary>
+    public class TestApiConsistency : ApiScanTestBase
+    {
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestProtectedFieldNames(Type typeFromTargetAssembly)
+        {
+            base.TestProtectedFieldNames(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestPrivateFieldNames(Type typeFromTargetAssembly)
+        {
+            base.TestPrivateFieldNames(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestPublicFields(Type typeFromTargetAssembly)
+        {
+            base.TestPublicFields(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestMethodParameterNames(Type typeFromTargetAssembly)
+        {
+            base.TestMethodParameterNames(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestInterfaceNames(Type typeFromTargetAssembly)
+        {
+            base.TestInterfaceNames(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestClassNames(Type typeFromTargetAssembly)
+        {
+            base.TestClassNames(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestForPropertiesWithNoGetter(Type typeFromTargetAssembly)
+        {
+            base.TestForPropertiesWithNoGetter(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestForPropertiesThatReturnArray(Type typeFromTargetAssembly)
+        {
+            base.TestForPropertiesThatReturnArray(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestForMethodsThatReturnWritableArray(Type typeFromTargetAssembly)
+        {
+            base.TestForMethodsThatReturnWritableArray(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestForPublicMembersContainingComparer(Type typeFromTargetAssembly)
+        {
+            base.TestForPublicMembersContainingComparer(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestForPublicMembersNamedSize(Type typeFromTargetAssembly)
+        {
+            base.TestForPublicMembersNamedSize(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestForPublicMembersContainingNonNetNumeric(Type typeFromTargetAssembly)
+        {
+            base.TestForPublicMembersContainingNonNetNumeric(typeFromTargetAssembly);
+        }
+
+        [Test, LuceneNetSpecific]
+        [TestCase(typeof(Lucene.Net.Codecs.BlockTerms.BlockTermsReader))]
+        public override void TestForPublicMembersWithNullableEnum(Type typeFromTargetAssembly)
+        {
+            base.TestForPublicMembersWithNullableEnum(typeFromTargetAssembly);
+        }
+    }
+}


[05/37] lucenenet git commit: Lucene.Net.Codecs.BlockTerms.TermsIndexReaderBase refactor: Changed return type of Seek(BytesRef), Next, and Seek(long) from long? to long to match Lucene

Posted by ni...@apache.org.
Lucene.Net.Codecs.BlockTerms.TermsIndexReaderBase refactor: Changed return type of Seek(BytesRef), Next, and Seek(long) from long? to long to match Lucene


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

Branch: refs/heads/api-work
Commit: 2060fbb974cc550afd2bdeb12b2276cbde59ce7b
Parents: c602c98
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 14:11:29 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 14:11:29 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs      |  4 ++--
 .../BlockTerms/FixedGapTermsIndexReader.cs                |  6 +++---
 src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs  |  6 +++---
 .../BlockTerms/VariableGapTermsIndexReader.cs             | 10 +++++-----
 4 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2060fbb9/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
index b287f95..b0bdeed 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
@@ -468,7 +468,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
                         // Ask terms index to find biggest indexed term (=
                         // first term in a block) that's <= our text:
-                        _input.Seek(_indexEnum.Seek(target).Value);
+                        _input.Seek(_indexEnum.Seek(target));
                         var result = NextBlock();
 
                         // Block must exist since, at least, the indexed term
@@ -797,7 +797,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     // TODO: if ord is in same terms block and
                     // after current ord, we should avoid this seek just
                     // like we do in the seek(BytesRef) case
-                    _input.Seek(_indexEnum.Seek(ord).Value);
+                    _input.Seek(_indexEnum.Seek(ord));
                     bool result = NextBlock();
 
                     // Block must exist since ord < numTerms:

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2060fbb9/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
index 0cb840d..c1551d8 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
@@ -208,7 +208,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             public override sealed BytesRef Term { get { return term; } }
 
-            public override long? Seek(BytesRef target) // LUCENENET TODO: return was not nullable in Lucene
+            public override long Seek(BytesRef target)
             {
                 var lo = 0; // binary search
                 var hi = _fieldIndex.NumIndexTerms - 1;
@@ -257,7 +257,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 return _fieldIndex.TermsStart + _fieldIndex.TermsDictOffsets.Get(hi);
             }
 
-            public override long? Next // LUCENENET TODO: Make into Next() method // LUCENENET TODO: return was not nullable in Lucene
+            public override long Next // LUCENENET TODO: Make into Next() method
             {
                 get
                 {
@@ -278,7 +278,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             public override long Ord { get { return ord; } }
 
-            public override long? Seek(long ord) // LUCENENET TODO: return was not nullable in Lucene
+            public override long Seek(long ord)
             {
                 var idx = (int)(ord / _fgtir._totalIndexInterval);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2060fbb9/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
index bf19dc1..02bff18 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
@@ -59,10 +59,10 @@ namespace Lucene.Net.Codecs.BlockTerms
             /// to term; returns file pointer index (into the main
             /// terms index file) for that term 
             /// </summary>
-            public abstract long? Seek(BytesRef term); // LUCENENET TODO: make non-null
+            public abstract long Seek(BytesRef term); 
 
             /// <summary>Returns -1 at end</summary>
-            public abstract long? Next { get; } // LUCENENET TODO: Make Next(), make non-null
+            public abstract long Next { get; } // LUCENENET TODO: Make Next()
 
             public abstract BytesRef Term { get; }
 
@@ -70,7 +70,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             /// <remarks>Only implemented if {@link TermsIndexReaderBase.supportsOrd()} 
             /// returns true</remarks>
             /// <returns></returns>
-            public abstract long? Seek(long ord); // LUCENENET TODO: make non-null
+            public abstract long Seek(long ord);
 
             /// <summary></summary>
             /// <remarks>Only implemented if {@link TermsIndexReaderBase.supportsOrd()} 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2060fbb9/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
index 48eaf86..164830b 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
@@ -140,13 +140,13 @@ namespace Lucene.Net.Codecs.BlockTerms
                 get { return _current == null ? null : _current.Input; }
             }
 
-            public override long? Seek(BytesRef target)
+            public override long Seek(BytesRef target)
             {
                 _current = _fstEnum.SeekFloor(target);
-                return _current.Output;
+                return _current.Output.GetValueOrDefault(); // LUCENENET NOTE: Not sure what to return if OutPut is null, so we are returning 0
             }
 
-            public override long? Next
+            public override long Next
             {
                 get
                 {
@@ -154,7 +154,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     if (_current == null)
                         return -1;
 
-                    return _current.Output;
+                    return _current.Output.Value;
                 }
             }
 
@@ -163,7 +163,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 get { throw new NotImplementedException(); }
             }
 
-            public override long? Seek(long ord)
+            public override long Seek(long ord)
             {
                 throw new NotImplementedException();
             }


[21/37] lucenenet git commit: Lucene.Net.Codecs.Memory.DirectPostingsFormat.DirectField (LowFreqTerm + HighFreqTerm) refactor: Changed public fields into properties backed by private fields

Posted by ni...@apache.org.
Lucene.Net.Codecs.Memory.DirectPostingsFormat.DirectField (LowFreqTerm + HighFreqTerm) refactor: Changed public fields into properties backed by private fields


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

Branch: refs/heads/api-work
Commit: 9fc749d0e10bdce30b17c5aee556bc70a13e35c6
Parents: 0d3588a
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 16:27:30 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:24 2017 +0700

----------------------------------------------------------------------
 .../Memory/DirectPostingsFormat.cs              | 103 ++++++++++++++-----
 1 file changed, 76 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9fc749d0/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
index cc3f4ba..498596b 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
@@ -208,10 +208,31 @@ namespace Lucene.Net.Codecs.Memory
 
             private sealed class LowFreqTerm : TermAndSkip
             {
-                public readonly int[] postings; // LUCENENET TODO: Make property
-                public readonly byte[] payloads; // LUCENENET TODO: Make property
-                public readonly int docFreq; // LUCENENET TODO: Make property
-                public readonly int totalTermFreq; // LUCENENET TODO: Make property
+                [WritableArray]
+                public int[] Postings
+                {
+                    get { return postings; }
+                }
+                private readonly int[] postings;
+
+                [WritableArray]
+                public byte[] Payloads
+                {
+                    get { return payloads; }
+                }
+                private readonly byte[] payloads;
+
+                public int DocFreq
+                {
+                    get { return docFreq; }
+                }
+                private readonly int docFreq;
+
+                public int TotalTermFreq
+                {
+                    get { return totalTermFreq; }
+                }
+                private readonly int totalTermFreq;
 
                 public LowFreqTerm(int[] postings, byte[] payloads, int docFreq, int totalTermFreq)
                 {
@@ -231,11 +252,39 @@ namespace Lucene.Net.Codecs.Memory
             // TODO: maybe specialize into prx/no-prx/no-frq cases?
             private sealed class HighFreqTerm : TermAndSkip
             {
-                public readonly long totalTermFreq; // LUCENENET TODO: Make property
-                public readonly int[] docIDs; // LUCENENET TODO: Make property
-                public readonly int[] freqs; // LUCENENET TODO: Make property
-                public readonly int[][] positions; // LUCENENET TODO: Make property
-                public readonly byte[][][] payloads; // LUCENENET TODO: Make property
+                public long TotalTermFreq
+                {
+                    get { return totalTermFreq; }
+                }
+                private readonly long totalTermFreq;
+
+                [WritableArray]
+                public int[] DocIDs
+                {
+                    get { return docIDs; }
+                }
+                private readonly int[] docIDs;
+
+                [WritableArray]
+                public int[] Freqs
+                {
+                    get { return freqs; }
+                }
+                private readonly int[] freqs;
+
+                [WritableArray]
+                public int[][] Positions
+                {
+                    get { return positions; }
+                }
+                private readonly int[][] positions;
+
+                [WritableArray]
+                public byte[][][] Payloads
+                {
+                    get { return payloads; }
+                }
+                private readonly byte[][][] payloads;
 
                 public HighFreqTerm(int[] docIDs, int[] freqs, int[][] positions, byte[][][] payloads,
                     long totalTermFreq)
@@ -977,11 +1026,11 @@ namespace Lucene.Net.Codecs.Memory
                     {
                         if (outerInstance.terms[termOrd] is LowFreqTerm)
                         {
-                            return ((LowFreqTerm)outerInstance.terms[termOrd]).docFreq;
+                            return ((LowFreqTerm)outerInstance.terms[termOrd]).DocFreq;
                         }
                         else
                         {
-                            return ((HighFreqTerm)outerInstance.terms[termOrd]).docIDs.Length;
+                            return ((HighFreqTerm)outerInstance.terms[termOrd]).DocIDs.Length;
                         }
                     }
                 }
@@ -992,11 +1041,11 @@ namespace Lucene.Net.Codecs.Memory
                     {
                         if (outerInstance.terms[termOrd] is LowFreqTerm)
                         {
-                            return ((LowFreqTerm)outerInstance.terms[termOrd]).totalTermFreq;
+                            return ((LowFreqTerm)outerInstance.terms[termOrd]).TotalTermFreq;
                         }
                         else
                         {
-                            return ((HighFreqTerm)outerInstance.terms[termOrd]).totalTermFreq;
+                            return ((HighFreqTerm)outerInstance.terms[termOrd]).TotalTermFreq;
                         }
                     }
                 }
@@ -1008,7 +1057,7 @@ namespace Lucene.Net.Codecs.Memory
 
                     if (outerInstance.terms[termOrd] is LowFreqTerm)
                     {
-                        int[] postings = ((LowFreqTerm) outerInstance.terms[termOrd]).postings;
+                        int[] postings = ((LowFreqTerm) outerInstance.terms[termOrd]).Postings;
                         if (outerInstance.hasFreq)
                         {
                             if (outerInstance.hasPos)
@@ -1099,7 +1148,7 @@ namespace Lucene.Net.Codecs.Memory
                         }
 
                         //System.out.println("  DE for term=" + new BytesRef(terms[termOrd].term).utf8ToString() + ": " + term.docIDs.length + " docs");
-                        return docsEnum.Reset(term.docIDs, term.freqs);
+                        return docsEnum.Reset(term.DocIDs, term.Freqs);
                     }
                 }
 
@@ -1117,8 +1166,8 @@ namespace Lucene.Net.Codecs.Memory
                     if (outerInstance.terms[termOrd] is LowFreqTerm)
                     {
                         LowFreqTerm term = ((LowFreqTerm) outerInstance.terms[termOrd]);
-                        int[] postings = term.postings;
-                        byte[] payloads = term.payloads;
+                        int[] postings = term.Postings;
+                        byte[] payloads = term.Payloads;
                         return
                             (new LowFreqDocsAndPositionsEnum(liveDocs, outerInstance.hasOffsets_Renamed,
                                 outerInstance.hasPayloads_Renamed)).Reset(postings, payloads);
@@ -1127,7 +1176,7 @@ namespace Lucene.Net.Codecs.Memory
                     {   HighFreqTerm term = (HighFreqTerm) outerInstance.terms[termOrd];
                         return
                             (new HighFreqDocsAndPositionsEnum(liveDocs, outerInstance.hasOffsets_Renamed)).Reset(
-                                term.docIDs, term.freqs, term.positions, term.payloads);
+                                term.DocIDs, term.Freqs, term.Positions, term.Payloads);
                     }
                 }
             }
@@ -1683,11 +1732,11 @@ namespace Lucene.Net.Codecs.Memory
                     {
                         if (outerInstance.terms[termOrd] is LowFreqTerm)
                         {
-                            return ((LowFreqTerm)outerInstance.terms[termOrd]).docFreq;
+                            return ((LowFreqTerm)outerInstance.terms[termOrd]).DocFreq;
                         }
                         else
                         {
-                            return ((HighFreqTerm)outerInstance.terms[termOrd]).docIDs.Length;
+                            return ((HighFreqTerm)outerInstance.terms[termOrd]).DocIDs.Length;
                         }
                     }
                 }
@@ -1698,11 +1747,11 @@ namespace Lucene.Net.Codecs.Memory
                     {
                         if (outerInstance.terms[termOrd] is LowFreqTerm)
                         {
-                            return ((LowFreqTerm)outerInstance.terms[termOrd]).totalTermFreq;
+                            return ((LowFreqTerm)outerInstance.terms[termOrd]).TotalTermFreq;
                         }
                         else
                         {
-                            return ((HighFreqTerm)outerInstance.terms[termOrd]).totalTermFreq;
+                            return ((HighFreqTerm)outerInstance.terms[termOrd]).TotalTermFreq;
                         }
                     }
                 }
@@ -1714,7 +1763,7 @@ namespace Lucene.Net.Codecs.Memory
 
                     if (outerInstance.terms[termOrd] is LowFreqTerm)
                     {
-                        int[] postings = ((LowFreqTerm) outerInstance.terms[termOrd]).postings;
+                        int[] postings = ((LowFreqTerm) outerInstance.terms[termOrd]).Postings;
                         if (outerInstance.hasFreq)
                         {
                             if (outerInstance.hasPos)
@@ -1748,7 +1797,7 @@ namespace Lucene.Net.Codecs.Memory
                     {
                         HighFreqTerm term = (HighFreqTerm) outerInstance.terms[termOrd];
                         //  System.out.println("DE for term=" + new BytesRef(terms[termOrd].term).utf8ToString() + ": " + term.docIDs.length + " docs");
-                        return (new HighFreqDocsEnum(liveDocs)).Reset(term.docIDs, term.freqs);
+                        return (new HighFreqDocsEnum(liveDocs)).Reset(term.DocIDs, term.Freqs);
                     }
                 }
 
@@ -1766,8 +1815,8 @@ namespace Lucene.Net.Codecs.Memory
                     if (outerInstance.terms[termOrd] is LowFreqTerm)
                     {
                         LowFreqTerm term = ((LowFreqTerm) outerInstance.terms[termOrd]);
-                        int[] postings = term.postings;
-                        byte[] payloads = term.payloads;
+                        int[] postings = term.Postings;
+                        byte[] payloads = term.Payloads;
                         return
                             (new LowFreqDocsAndPositionsEnum(liveDocs, outerInstance.hasOffsets_Renamed,
                                 outerInstance.hasPayloads_Renamed)).Reset(postings, payloads);
@@ -1777,7 +1826,7 @@ namespace Lucene.Net.Codecs.Memory
                         HighFreqTerm term = (HighFreqTerm) outerInstance.terms[termOrd];
                         return
                             (new HighFreqDocsAndPositionsEnum(liveDocs, outerInstance.hasOffsets_Renamed)).Reset(
-                                term.docIDs, term.freqs, term.positions, term.payloads);
+                                term.DocIDs, term.Freqs, term.Positions, term.Payloads);
                     }
                 }
 


[06/37] lucenenet git commit: Lucene.Net.Codecs.BlockTerms.TermsIndexReaderBase refactor: Next > Next(), RamBytesUsed > RamBytesUsed()

Posted by ni...@apache.org.
Lucene.Net.Codecs.BlockTerms.TermsIndexReaderBase refactor: Next > Next(), RamBytesUsed > RamBytesUsed()


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

Branch: refs/heads/api-work
Commit: 8bdeedc43c8759a8076c61fa228ebf3649bb8e8b
Parents: 2060fbb
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 14:25:53 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 14:25:53 2017 +0700

----------------------------------------------------------------------
 .../BlockTerms/BlockTermsReader.cs              |  4 +--
 .../BlockTerms/FixedGapTermsIndexReader.cs      | 34 ++++++++------------
 .../BlockTerms/TermsIndexReaderBase.cs          |  6 ++--
 .../BlockTerms/VariableGapTermsIndexReader.cs   | 23 ++++++-------
 4 files changed, 29 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8bdeedc4/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
index b0bdeed..e427beb 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
@@ -447,7 +447,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                             // Target term is after current term
                             if (!_didIndexNext)
                             {
-                                _nextIndexTerm = _indexEnum.Next == -1 ? null : _indexEnum.Term;
+                                _nextIndexTerm = _indexEnum.Next() == -1 ? null : _indexEnum.Term;
                                 _didIndexNext = true;
                             }
 
@@ -953,7 +953,7 @@ namespace Lucene.Net.Codecs.BlockTerms
         public override long RamBytesUsed()
         {
             var sizeInBytes = (_postingsReader != null) ? _postingsReader.RamBytesUsed() : 0;
-            sizeInBytes += (_indexReader != null) ? _indexReader.RamBytesUsed : 0;
+            sizeInBytes += (_indexReader != null) ? _indexReader.RamBytesUsed() : 0;
             return sizeInBytes;
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8bdeedc4/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
index c1551d8..8804803 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
@@ -257,23 +257,20 @@ namespace Lucene.Net.Codecs.BlockTerms
                 return _fieldIndex.TermsStart + _fieldIndex.TermsDictOffsets.Get(hi);
             }
 
-            public override long Next // LUCENENET TODO: Make into Next() method
+            public override long Next()
             {
-                get
-                {
-                    var idx = 1 + (int)(ord / _fgtir._totalIndexInterval);
-                    if (idx >= _fieldIndex.NumIndexTerms)
-                        return -1;
+                var idx = 1 + (int)(ord / _fgtir._totalIndexInterval);
+                if (idx >= _fieldIndex.NumIndexTerms)
+                    return -1;
 
-                    ord += _fgtir._totalIndexInterval;
+                ord += _fgtir._totalIndexInterval;
 
-                    var offset = _fieldIndex.TermOffsets.Get(idx);
-                    var length = (int)(_fieldIndex.TermOffsets.Get(1 + idx) - offset);
+                var offset = _fieldIndex.TermOffsets.Get(idx);
+                var length = (int)(_fieldIndex.TermOffsets.Get(1 + idx) - offset);
 
-                    _fgtir._termBytesReader.FillSlice(Term, _fieldIndex.TermBytesStart + offset, length);
+                _fgtir._termBytesReader.FillSlice(Term, _fieldIndex.TermBytesStart + offset, length);
 
-                    return _fieldIndex.TermsStart + _fieldIndex.TermsDictOffsets.Get(idx);
-                }
+                return _fieldIndex.TermsStart + _fieldIndex.TermsDictOffsets.Get(idx);
             }
 
             public override long Ord { get { return ord; } }
@@ -522,16 +519,13 @@ namespace Lucene.Net.Codecs.BlockTerms
             input.Seek(dirOffset);
         }
 
-        public override long RamBytesUsed
+        public override long RamBytesUsed()
         {
-            get
-            {
-                var sizeInBytes = ((_termBytes != null) ? _termBytes.RamBytesUsed() : 0) +
-                                  ((_termBytesReader != null) ? _termBytesReader.RamBytesUsed() : 0);
+            var sizeInBytes = ((_termBytes != null) ? _termBytes.RamBytesUsed() : 0) +
+                                ((_termBytesReader != null) ? _termBytesReader.RamBytesUsed() : 0);
 
-                return _fields.Values.Aggregate(sizeInBytes,
-                    (current, entry) => (current + entry.CoreIndex.RamBytesUsed));
-            }
+            return _fields.Values.Aggregate(sizeInBytes,
+                (current, entry) => (current + entry.CoreIndex.RamBytesUsed));
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8bdeedc4/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
index 02bff18..76ee43c 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
@@ -59,10 +59,10 @@ namespace Lucene.Net.Codecs.BlockTerms
             /// to term; returns file pointer index (into the main
             /// terms index file) for that term 
             /// </summary>
-            public abstract long Seek(BytesRef term); 
+            public abstract long Seek(BytesRef term);
 
             /// <summary>Returns -1 at end</summary>
-            public abstract long Next { get; } // LUCENENET TODO: Make Next()
+            public abstract long Next();
 
             public abstract BytesRef Term { get; }
 
@@ -80,6 +80,6 @@ namespace Lucene.Net.Codecs.BlockTerms
         }
 
         /// <summary>Returns approximate RAM bytes used</summary>
-        public abstract long RamBytesUsed { get; } // LUCENENET TODO: Make RamBytesUsed()
+        public abstract long RamBytesUsed();
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8bdeedc4/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
index 164830b..f6dc09d 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
@@ -143,29 +143,26 @@ namespace Lucene.Net.Codecs.BlockTerms
             public override long Seek(BytesRef target)
             {
                 _current = _fstEnum.SeekFloor(target);
-                return _current.Output.GetValueOrDefault(); // LUCENENET NOTE: Not sure what to return if OutPut is null, so we are returning 0
+                return _current.Output.GetValueOrDefault(); // LUCENENET NOTE: Not sure what to return if Output is null, so we are returning 0
             }
 
-            public override long Next
+            public override long Next()
             {
-                get
-                {
-                    _current = _fstEnum.Next();
-                    if (_current == null)
-                        return -1;
+                _current = _fstEnum.Next();
+                if (_current == null)
+                    return -1;
 
-                    return _current.Output.Value;
-                }
+                return _current.Output.Value;
             }
 
             public override long Ord
             {
-                get { throw new NotImplementedException(); }
+                get { throw new NotSupportedException(); } 
             }
 
             public override long Seek(long ord)
             {
-                throw new NotImplementedException();
+                throw new NotSupportedException();
             }
         }
 
@@ -267,9 +264,9 @@ namespace Lucene.Net.Codecs.BlockTerms
             input.Seek(dirOffset);
         }
 
-        public override long RamBytesUsed
+        public override long RamBytesUsed()
         {
-            get { return _fields.Values.Sum(entry => entry.RamBytesUsed()); }
+            return _fields.Values.Sum(entry => entry.RamBytesUsed());
         }
     }
 }


[15/37] lucenenet git commit: Lucene.Net.Codecs.Sep (SepSkipListReader + SepSkipListWriter) refactor: IndexOptions (setter only) > SetIndexOptions(IndexOptions)

Posted by ni...@apache.org.
Lucene.Net.Codecs.Sep (SepSkipListReader + SepSkipListWriter) refactor: IndexOptions (setter only) > SetIndexOptions(IndexOptions)


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

Branch: refs/heads/api-work
Commit: a5cffba471ffaf06d8be898a759bab021751098c
Parents: d534f63
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 15:58:58 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:22 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs | 4 ++--
 src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs | 2 +-
 src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs | 7 +++----
 src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs | 4 ++--
 4 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5cffba4/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
index 6aa63b2..60dc069 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
@@ -435,7 +435,7 @@ namespace Lucene.Net.Codecs.Sep
                     {
                         // We haven't yet skipped for this posting
                         _skipper.Init(_skipFp, _docIndex, _freqIndex, _posIndex, 0, _docFreq, _storePayloads);
-                        _skipper.IndexOptions = _indexOptions;
+                        _skipper.SetIndexOptions(_indexOptions);
 
                         _skipped = true;
                     }
@@ -610,7 +610,7 @@ namespace Lucene.Net.Codecs.Sep
                         //System.out.println("  init skip data skipFP=" + skipFP);
                         // We haven't yet skipped for this posting
                         _skipper.Init(_skipFp, _docIndex, _freqIndex, _posIndex, _payloadFp, _docFreq, _storePayloads);
-                        _skipper.IndexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
+                        _skipper.SetIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
                         _skipped = true;
                     }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5cffba4/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
index fe0a000..8489b3d 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
@@ -200,7 +200,7 @@ namespace Lucene.Net.Codecs.Sep
             {
                 throw new System.NotSupportedException("this codec cannot index offsets");
             }
-            skipListWriter.IndexOptions = indexOptions;
+            skipListWriter.SetIndexOptions(indexOptions);
             storePayloads = indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS &&
                             fieldInfo.HasPayloads;
             lastPayloadFP = 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5cffba4/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
index 210d468..fdd17e7 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
@@ -43,8 +43,6 @@ namespace Lucene.Net.Codecs.Sep
         private readonly IntIndexInput.AbstractIndex _lastDocIndex;
         private readonly IntIndexInput.AbstractIndex _lastPosIndex;
 
-        private IndexOptions _indexOptions;
-
         private long _lastPayloadPointer;
         private int _lastPayloadLength;
 
@@ -79,10 +77,11 @@ namespace Lucene.Net.Codecs.Sep
             _lastPosIndex = posIn != null ? posIn.GetIndex() : null;
         }
 
+        private IndexOptions _indexOptions;
 
-        internal virtual IndexOptions IndexOptions // LUCENENET TODO: Make into SetIndexOptions(IndexOptions)
+        internal virtual void SetIndexOptions(IndexOptions v)
         {
-            set { _indexOptions = value; }
+            _indexOptions = v;
         }
 
         internal virtual void Init(long skipPointer, IntIndexInput.AbstractIndex docBaseIndex, IntIndexInput.AbstractIndex freqBaseIndex,

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5cffba4/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
index 30ac97b..d817d40 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
@@ -85,9 +85,9 @@ namespace Lucene.Net.Codecs.Sep
 
         private IndexOptions _indexOptions;
 
-        internal virtual IndexOptions IndexOptions // LUCENENET TODO: Make SetIndexOptions(IndexOptions v)
+        internal virtual void SetIndexOptions(IndexOptions v)
         {
-            set { _indexOptions = value; }
+            _indexOptions = v;
         }
 
         internal virtual IntIndexOutput PosOutput // LUCENENET TODO: Make SetPosOutput(IntIndexOutput posOutput)


[07/37] lucenenet git commit: Lucene.Net.Codecs refactor: renamed all outer instance fields to outerInstance and moved them to the beginning of the constructor parameter list.

Posted by ni...@apache.org.
Lucene.Net.Codecs refactor: renamed all outer instance fields to outerInstance and moved them to the beginning of the constructor parameter list.


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

Branch: refs/heads/api-work
Commit: 9b5fd73016290b6ca456d170009970fc91c66f64
Parents: 8bdeedc
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 14:35:06 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 14:35:06 2017 +0700

----------------------------------------------------------------------
 .../BlockTerms/BlockTermsWriter.cs              | 36 ++++++++++----------
 .../BlockTerms/FixedGapTermsIndexReader.cs      | 21 +++++-------
 .../BlockTerms/FixedGapTermsIndexWriter.cs      | 27 +++++++--------
 .../BlockTerms/VariableGapTermsIndexReader.cs   | 21 ++++++------
 .../BlockTerms/VariableGapTermsIndexWriter.cs   | 17 +++++----
 .../Bloom/BloomFilteringPostingsFormat.cs       | 17 +++++----
 6 files changed, 66 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
index 81411a7..17d0b30 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
@@ -120,7 +120,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             CurrentField = field;
             var fiw = _termsIndexWriter.AddField(field, _output.FilePointer);
-            return new TermsWriter(fiw, field, PostingsWriter, this);
+            return new TermsWriter(this, fiw, field, PostingsWriter);
         }
 
         public override void Dispose()
@@ -173,8 +173,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         internal class TermsWriter : TermsConsumer
         {
-            // Outer instance
-            private readonly BlockTermsWriter _btw;
+            private readonly BlockTermsWriter outerInstance;
 
             private readonly FieldInfo _fieldInfo;
             private readonly PostingsWriterBase _postingsWriter;
@@ -191,20 +190,21 @@ namespace Lucene.Net.Codecs.BlockTerms
             private int _pendingCount;
 
             internal TermsWriter(
+                BlockTermsWriter outerInstance,
                 TermsIndexWriterBase.FieldWriter fieldIndexWriter,
                 FieldInfo fieldInfo,
-                PostingsWriterBase postingsWriter, BlockTermsWriter btw)
+                PostingsWriterBase postingsWriter)
             {
+                this.outerInstance = outerInstance;
                 _fieldInfo = fieldInfo;
                 _fieldIndexWriter = fieldIndexWriter;
-                _btw = btw;
 
                 _pendingTerms = new TermEntry[32];
                 for (int i = 0; i < _pendingTerms.Length; i++)
                 {
                     _pendingTerms[i] = new TermEntry();
                 }
-                _termsStartPointer = _btw._output.FilePointer;
+                _termsStartPointer = this.outerInstance._output.FilePointer;
                 _postingsWriter = postingsWriter;
                 _longsSize = postingsWriter.SetField(fieldInfo);
             }
@@ -237,7 +237,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                         // entire block in between index terms:
                         FlushBlock();
                     }
-                    _fieldIndexWriter.Add(text, stats, _btw._output.FilePointer);
+                    _fieldIndexWriter.Add(text, stats, outerInstance._output.FilePointer);
                 }
 
                 if (_pendingTerms.Length == _pendingCount)
@@ -271,16 +271,16 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
 
                 // EOF marker:
-                _btw._output.WriteVInt(0);
+                outerInstance._output.WriteVInt(0);
 
                 _sumTotalTermFreq = sumTotalTermFreq;
                 _sumDocFreq = sumDocFreq;
                 _docCount = docCount;
-                _fieldIndexWriter.Finish(_btw._output.FilePointer);
+                _fieldIndexWriter.Finish(outerInstance._output.FilePointer);
 
                 if (_numTerms > 0)
                 {
-                    _btw._fields.Add(new FieldMetaData(_fieldInfo,
+                    outerInstance._fields.Add(new FieldMetaData(_fieldInfo,
                         _numTerms,
                         _termsStartPointer,
                         sumTotalTermFreq,
@@ -329,8 +329,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                             _pendingTerms[termCount].Term));
                 }
 
-                _btw._output.WriteVInt(_pendingCount);
-                _btw._output.WriteVInt(commonPrefix);
+                outerInstance._output.WriteVInt(_pendingCount);
+                outerInstance._output.WriteVInt(commonPrefix);
 
                 // 2nd pass: write suffixes, as separate byte[] blob
                 for (var termCount = 0; termCount < _pendingCount; termCount++)
@@ -341,8 +341,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                     _bytesWriter.WriteVInt(suffix);
                     _bytesWriter.WriteBytes(_pendingTerms[termCount].Term.Bytes, commonPrefix, suffix);
                 }
-                _btw._output.WriteVInt((int)_bytesWriter.FilePointer);
-                _bytesWriter.WriteTo(_btw._output);
+                outerInstance._output.WriteVInt((int)_bytesWriter.FilePointer);
+                _bytesWriter.WriteTo(outerInstance._output);
                 _bytesWriter.Reset();
 
                 // 3rd pass: write the freqs as byte[] blob
@@ -360,8 +360,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                         _bytesWriter.WriteVLong(state.TotalTermFreq - state.DocFreq);
                     }
                 }
-                _btw._output.WriteVInt((int)_bytesWriter.FilePointer);
-                _bytesWriter.WriteTo(_btw._output);
+                outerInstance._output.WriteVInt((int)_bytesWriter.FilePointer);
+                _bytesWriter.WriteTo(outerInstance._output);
                 _bytesWriter.Reset();
 
                 // 4th pass: write the metadata 
@@ -379,8 +379,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                     _bufferWriter.Reset();
                     absolute = false;
                 }
-                _btw._output.WriteVInt((int)_bytesWriter.FilePointer);
-                _bytesWriter.WriteTo(_btw._output);
+                outerInstance._output.WriteVInt((int)_bytesWriter.FilePointer);
+                _bytesWriter.WriteTo(outerInstance._output);
                 _bytesWriter.Reset();
 
                 _lastPrevTerm.CopyBytes(_pendingTerms[_pendingCount - 1].Term);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
index 8804803..01813cf 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
@@ -143,8 +143,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                     try
                     {
                         _fields.Add(fieldInfo,
-                            new FieldIndexData(numIndexTerms, indexStart, termsStart, packedIndexStart,
-                                packedOffsetsStart, this));
+                            new FieldIndexData(this, numIndexTerms, indexStart, termsStart, packedIndexStart,
+                                packedOffsetsStart));
                     }
                     catch (ArgumentException)
                     {
@@ -299,8 +299,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class FieldIndexData
         {
-            // Outer instance
-            private readonly FixedGapTermsIndexReader _fgtir; // LUCENENET TODO: In this assembly, change all variables marked "Outer instance" to be named outerInstance and move them to the beginning of the ctor parameter list
+            private readonly FixedGapTermsIndexReader outerInstance;
 
             internal volatile CoreFieldIndex CoreIndex;
 
@@ -311,19 +310,17 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             private readonly int _numIndexTerms;
             
-            public FieldIndexData(int numIndexTerms, long indexStart, long termsStart,
-                long packedIndexStart,
-                long packedOffsetsStart, FixedGapTermsIndexReader fgtir)
+            public FieldIndexData(FixedGapTermsIndexReader outerInstance, int numIndexTerms, long indexStart, long termsStart,
+                long packedIndexStart, long packedOffsetsStart)
             {
-
+                this.outerInstance = outerInstance;
                 _termsStart = termsStart;
                 _indexStart = indexStart;
                 _packedIndexStart = packedIndexStart;
                 _packedOffsetsStart = packedOffsetsStart;
                 _numIndexTerms = numIndexTerms;
-                _fgtir = fgtir;
-
-                if (_fgtir._indexDivisor > 0)
+                
+                if (this.outerInstance._indexDivisor > 0)
                     LoadTermsIndex();
             }
 
@@ -331,7 +328,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 if (CoreIndex == null)
                     CoreIndex = new CoreFieldIndex(_indexStart, _termsStart, _packedIndexStart, _packedOffsetsStart,
-                        _numIndexTerms, _fgtir);
+                        _numIndexTerms, outerInstance);
             }
 
             internal class CoreFieldIndex

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
index 74b55d7..74ba41d 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
@@ -83,7 +83,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         public override FieldWriter AddField(FieldInfo field, long termsFilePointer)
         {
-            var writer = new SimpleFieldWriter(field, termsFilePointer, this);
+            var writer = new SimpleFieldWriter(this, field, termsFilePointer);
             _fields.Add(writer);
             return writer;
         }
@@ -113,8 +113,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class SimpleFieldWriter : FieldWriter
         {
-            // Outer instance
-            private readonly FixedGapTermsIndexWriter _fgtiw;
+            private readonly FixedGapTermsIndexWriter outerInstance;
 
             internal readonly FieldInfo FieldInfo;
             internal int NumIndexTerms;
@@ -134,26 +133,26 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             private readonly BytesRef _lastTerm = new BytesRef();
 
-            internal SimpleFieldWriter(FieldInfo fieldInfo, long termsFilePointer, FixedGapTermsIndexWriter fgtiw)
+            internal SimpleFieldWriter(FixedGapTermsIndexWriter outerInstance, FieldInfo fieldInfo, long termsFilePointer)
             {
+                this.outerInstance = outerInstance;
                 FieldInfo = fieldInfo;
-                IndexStart = fgtiw.Output.FilePointer;
+                IndexStart = outerInstance.Output.FilePointer;
                 TermsStart = _lastTermsPointer = termsFilePointer;
                 _termLengths = new short[0];
                 _termsPointerDeltas = new int[0];
-                _fgtiw = fgtiw;
             }
 
             public override bool CheckIndexTerm(BytesRef text, TermStats stats)
             {
                 // First term is first indexed term:
                 //System.output.println("FGW: checkIndexTerm text=" + text.utf8ToString());
-                if (0 == (_numTerms++ % _fgtiw._termIndexInterval))
+                if (0 == (_numTerms++ % outerInstance._termIndexInterval))
                     return true;
 
                 // save last term just before next index term so we
                 // can compute wasted suffix
-                if (0 == _numTerms % _fgtiw._termIndexInterval)
+                if (0 == _numTerms % outerInstance._termIndexInterval)
                     _lastTerm.CopyBytes(text);
 
                 return false;
@@ -161,11 +160,11 @@ namespace Lucene.Net.Codecs.BlockTerms
 
             public override void Add(BytesRef text, TermStats stats, long termsFilePointer)
             {
-                int indexedTermLength = _fgtiw.IndexedTermPrefixLength(_lastTerm, text);
+                int indexedTermLength = outerInstance.IndexedTermPrefixLength(_lastTerm, text);
 
                 // write only the min prefix that shows the diff
                 // against prior term
-                _fgtiw.Output.WriteBytes(text.Bytes, text.Offset, indexedTermLength);
+                outerInstance.Output.WriteBytes(text.Bytes, text.Offset, indexedTermLength);
 
                 if (_termLengths.Length == NumIndexTerms)
                 {
@@ -192,9 +191,9 @@ namespace Lucene.Net.Codecs.BlockTerms
             public override void Finish(long termsFilePointer)
             {
                 // write primary terms dict offsets
-                PackedIndexStart = _fgtiw.Output.FilePointer;
+                PackedIndexStart = outerInstance.Output.FilePointer;
 
-                PackedInts.Writer w = PackedInts.GetWriter(_fgtiw.Output, NumIndexTerms,
+                PackedInts.Writer w = PackedInts.GetWriter(outerInstance.Output, NumIndexTerms,
                     PackedInts.BitsRequired(termsFilePointer),
                     PackedInts.DEFAULT);
 
@@ -207,10 +206,10 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
                 w.Finish();
 
-                PackedOffsetsStart = _fgtiw.Output.FilePointer;
+                PackedOffsetsStart = outerInstance.Output.FilePointer;
 
                 // write offsets into the byte[] terms
-                w = PackedInts.GetWriter(_fgtiw.Output, 1 + NumIndexTerms, PackedInts.BitsRequired(_totTermLength),
+                w = PackedInts.GetWriter(outerInstance.Output, 1 + NumIndexTerms, PackedInts.BitsRequired(_totTermLength),
                     PackedInts.DEFAULT);
                 upto = 0;
                 for (int i = 0; i < NumIndexTerms; i++)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
index f6dc09d..227c37b 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
@@ -85,7 +85,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     
                     try
                     {
-                        _fields.Add(fieldInfo, new FieldIndexData(indexStart, this));
+                        _fields.Add(fieldInfo, new FieldIndexData(this, indexStart));
                     }
                     catch (ArgumentException)
                     {
@@ -173,19 +173,18 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class FieldIndexData
         {
-            // Outer instance
-            private readonly VariableGapTermsIndexReader _vgtir;
+            private readonly VariableGapTermsIndexReader outerInstance;
 
             private readonly long _indexStart;
             // Set only if terms index is loaded:
             internal volatile FST<long?> Fst;
             
-            public FieldIndexData(long indexStart, VariableGapTermsIndexReader vgtir)
+            public FieldIndexData(VariableGapTermsIndexReader outerInstance, long indexStart)
             {
-                _vgtir = vgtir;
+                this.outerInstance = outerInstance;
                 _indexStart = indexStart;
 
-                if (_vgtir._indexDivisor > 0)
+                if (this.outerInstance._indexDivisor > 0)
                     LoadTermsIndex();
             }
 
@@ -193,9 +192,9 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 if (Fst != null) return;
 
-                var clone = (IndexInput)_vgtir._input.Clone();
+                var clone = (IndexInput)outerInstance._input.Clone();
                 clone.Seek(_indexStart);
-                Fst = new FST<long?>(clone, _vgtir._fstOutputs);
+                Fst = new FST<long?>(clone, outerInstance._fstOutputs);
                 clone.Dispose();
 
                 /*
@@ -206,19 +205,19 @@ namespace Lucene.Net.Codecs.BlockTerms
                 w.close();
                 */
 
-                if (_vgtir._indexDivisor > 1)
+                if (outerInstance._indexDivisor > 1)
                 {
                     // subsample
                     var scratchIntsRef = new IntsRef();
                     var outputs = PositiveIntOutputs.Singleton;
                     var builder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, outputs);
                     var fstEnum = new BytesRefFSTEnum<long?>(Fst);
-                    var count = _vgtir._indexDivisor;
+                    var count = outerInstance._indexDivisor;
 
                     BytesRefFSTEnum.InputOutput<long?> result;
                     while ((result = fstEnum.Next()) != null)
                     {
-                        if (count == _vgtir._indexDivisor)
+                        if (count == outerInstance._indexDivisor)
                         {
                             builder.Add(Util.ToIntsRef(result.Input, scratchIntsRef), result.Output);
                             count = 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
index c172433..2426546 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
@@ -201,7 +201,7 @@ namespace Lucene.Net.Codecs.BlockTerms
         public override FieldWriter AddField(FieldInfo field, long termsFilePointer)
         {
             _policy.NewField(field);
-            var writer = new FstFieldWriter(field, termsFilePointer, this);
+            var writer = new FstFieldWriter(this, field, termsFilePointer);
             _fields.Add(writer);
             return writer;
         }
@@ -232,8 +232,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class FstFieldWriter : FieldWriter
         {
-            // Outer instance
-            private readonly VariableGapTermsIndexWriter _vgtiw;
+            private readonly VariableGapTermsIndexWriter outerInstance;
 
             private readonly Builder<long?> _fstBuilder;
             private readonly PositiveIntOutputs fstOutputs;
@@ -246,13 +245,13 @@ namespace Lucene.Net.Codecs.BlockTerms
             private readonly BytesRef _lastTerm = new BytesRef();
             private bool _first = true;
 
-            public FstFieldWriter(FieldInfo fieldInfo, long termsFilePointer, VariableGapTermsIndexWriter vgtiw)
+            public FstFieldWriter(VariableGapTermsIndexWriter outerInstance, FieldInfo fieldInfo, long termsFilePointer)
             {
-                _vgtiw = vgtiw;
+                this.outerInstance = outerInstance;
                 FieldInfo = fieldInfo;
                 PositiveIntOutputs fstOutputs = PositiveIntOutputs.Singleton;
                 _fstBuilder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, fstOutputs);
-                IndexStart = _vgtiw.Output.FilePointer;
+                IndexStart = this.outerInstance.Output.FilePointer;
 
                 // Always put empty string in
                 _fstBuilder.Add(new IntsRef(), termsFilePointer);
@@ -263,7 +262,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 // NOTE: we must force the first term per field to be
                 // indexed, in case policy doesn't:
-                if (_vgtiw._policy.IsIndexTerm(text, stats) || _first)
+                if (outerInstance._policy.IsIndexTerm(text, stats) || _first)
                 {
                     _first = false;
                     return true;
@@ -284,7 +283,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     return;
                 }
                 int lengthSave = text.Length;
-                text.Length = _vgtiw.IndexedTermPrefixLength(_lastTerm, text);
+                text.Length = outerInstance.IndexedTermPrefixLength(_lastTerm, text);
                 try
                 {
                     _fstBuilder.Add(Util.ToIntsRef(text, _scratchIntsRef), termsFilePointer);
@@ -300,7 +299,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 Fst = _fstBuilder.Finish();
                 if (Fst != null)
-                    Fst.Save(_vgtiw.Output);
+                    Fst.Save(outerInstance.Output);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9b5fd730/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
index 1133abe..4be901a 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -408,24 +408,23 @@ namespace Lucene.Net.Codecs.Bloom
 
         internal class BloomFilteredFieldsConsumer : FieldsConsumer
         {
-            // Outer instance
-            private readonly BloomFilteringPostingsFormat _bfpf;
+            private readonly BloomFilteringPostingsFormat outerInstance;
 
             private readonly FieldsConsumer _delegateFieldsConsumer;
             private readonly Dictionary<FieldInfo, FuzzySet> _bloomFilters = new Dictionary<FieldInfo, FuzzySet>();
             private readonly SegmentWriteState _state;
             
-            public BloomFilteredFieldsConsumer(FieldsConsumer fieldsConsumer,
-                SegmentWriteState state, BloomFilteringPostingsFormat bfpf)
+            public BloomFilteredFieldsConsumer(BloomFilteringPostingsFormat outerInstance, FieldsConsumer fieldsConsumer,
+                SegmentWriteState state)
             {
+                this.outerInstance = outerInstance;
                 _delegateFieldsConsumer = fieldsConsumer;
                 _state = state;
-                _bfpf = bfpf;
             }
 
             public override TermsConsumer AddField(FieldInfo field)
             {
-                var bloomFilter = _bfpf._bloomFilterFactory.GetSetForField(_state, field);
+                var bloomFilter = outerInstance._bloomFilterFactory.GetSetForField(_state, field);
                 if (bloomFilter != null)
                 {
                     Debug.Assert((_bloomFilters.ContainsKey(field) == false));
@@ -443,7 +442,7 @@ namespace Lucene.Net.Codecs.Bloom
             {
                 _delegateFieldsConsumer.Dispose();
                 // Now we are done accumulating values for these fields
-                var nonSaturatedBlooms = (from entry in _bloomFilters.EntrySet() let bloomFilter = entry.Value where !_bfpf._bloomFilterFactory.IsSaturated(bloomFilter, entry.Key) select entry).ToList();
+                var nonSaturatedBlooms = (from entry in _bloomFilters.EntrySet() let bloomFilter = entry.Value where !outerInstance._bloomFilterFactory.IsSaturated(bloomFilter, entry.Key) select entry).ToList();
 
                 var bloomFileName = IndexFileNames.SegmentFileName(
                     _state.SegmentInfo.Name, _state.SegmentSuffix, BLOOM_EXTENSION);
@@ -454,7 +453,7 @@ namespace Lucene.Net.Codecs.Bloom
                     bloomOutput = _state.Directory.CreateOutput(bloomFileName, _state.Context);
                     CodecUtil.WriteHeader(bloomOutput, BLOOM_CODEC_NAME, VERSION_CURRENT);
                     // remember the name of the postings format we will delegate to
-                    bloomOutput.WriteString(_bfpf._delegatePostingsFormat.Name);
+                    bloomOutput.WriteString(outerInstance._delegatePostingsFormat.Name);
 
                     // First field in the output file is the number of fields+blooms saved
                     bloomOutput.WriteInt(nonSaturatedBlooms.Count);
@@ -479,7 +478,7 @@ namespace Lucene.Net.Codecs.Bloom
             private void SaveAppropriatelySizedBloomFilter(DataOutput bloomOutput,
                 FuzzySet bloomFilter, FieldInfo fieldInfo)
             {
-                var rightSizedSet = _bfpf._bloomFilterFactory.Downsize(fieldInfo,
+                var rightSizedSet = outerInstance._bloomFilterFactory.Downsize(fieldInfo,
                     bloomFilter) ?? bloomFilter;
 
                 rightSizedSet.Serialize(bloomOutput);


[10/37] lucenenet git commit: Lucene.Net.Codecs.Sep.IntIndexInput refactor: Reader() > GetReader(), Index() > GetIndex()

Posted by ni...@apache.org.
Lucene.Net.Codecs.Sep.IntIndexInput refactor: Reader() > GetReader(), Index() > GetIndex()


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

Branch: refs/heads/api-work
Commit: e17cce9c9a6c959e0434b44fd9a1855589fc8c46
Parents: 7586bb8
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 14:43:15 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 14:44:22 2017 +0700

----------------------------------------------------------------------
 .../Bloom/BloomFilteringPostingsFormat.cs       |  3 +--
 .../Intblock/FixedIntBlockIndexInput.cs         |  4 +--
 .../Intblock/VariableIntBlockIndexInput.cs      |  4 +--
 src/Lucene.Net.Codecs/Sep/IntIndexInput.cs      |  6 ++---
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs  | 28 ++++++++++----------
 src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs  | 12 ++++-----
 .../Codecs/MockSep/MockSingleIntIndexInput.cs   |  4 +--
 .../IntBlock/TestIntBlockCodec.cs               |  4 +--
 8 files changed, 32 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
index 96024a8..0da915d 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -116,8 +116,7 @@ namespace Lucene.Net.Codecs.Bloom
             {
                 throw new InvalidOperationException("Error - constructed without a choice of PostingsFormat");
             }
-            return new BloomFilteredFieldsConsumer(
-                _delegatePostingsFormat.FieldsConsumer(state), state, this);
+            return new BloomFilteredFieldsConsumer(this, _delegatePostingsFormat.FieldsConsumer(state), state);
         }
 
         public override FieldsProducer FieldsProducer(SegmentReadState state)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
index 9b09d6b..7b9702a 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
@@ -45,7 +45,7 @@ namespace Lucene.Net.Codecs.IntBlock
             blockSize = @in.ReadVInt();
         }
 
-        public override IntIndexInputReader Reader()
+        public override IntIndexInputReader GetReader()
         {
             var buffer = new int[blockSize];
             var clone = (IndexInput)input.Clone();
@@ -58,7 +58,7 @@ namespace Lucene.Net.Codecs.IntBlock
             input.Dispose();
         }
 
-        public override IntIndexInputIndex Index()
+        public override IntIndexInputIndex GetIndex()
         {
             return new InputIndex(this);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
index 6aaeb79..440de80 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
@@ -47,7 +47,7 @@ namespace Lucene.Net.Codecs.IntBlock
             maxBlockSize = input.ReadInt();
         }
 
-        public override IntIndexInputReader Reader()
+        public override IntIndexInputReader GetReader()
         {
             var buffer = new int[maxBlockSize];
             var clone = (IndexInput)input.Clone();
@@ -60,7 +60,7 @@ namespace Lucene.Net.Codecs.IntBlock
             input.Dispose();
         }
 
-        public override IntIndexInputIndex Index()
+        public override IntIndexInputIndex GetIndex()
         {
             return new InputIndex(this);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
index 6c46a3c..f67abe7 100644
--- a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
@@ -29,9 +29,9 @@ namespace Lucene.Net.Codecs.Sep
     /// </summary>
     public abstract class IntIndexInput : IDisposable
     {
-        public abstract IntIndexInputReader Reader(); // LUCENENET TODO: Rename GetReader()
+        public abstract IntIndexInputReader GetReader();
         public abstract void Dispose();
-        public abstract IntIndexInputIndex Index(); // LUCENENET TODO: Rename GetIndex()
+        public abstract IntIndexInputIndex GetIndex();
 
       
     }
@@ -44,7 +44,7 @@ namespace Lucene.Net.Codecs.Sep
     }
 
     /// <summary>
-    /// Records a single skip-point in the <seealso cref="IntIndexInput.Reader"/>. </summary>
+    /// Records a single skip-point in the <seealso cref="IntIndexInput.GetReader"/>. </summary>
     public abstract class IntIndexInputIndex // LUCENENET TODO: Rename AbstractIndex and nest within IntIndexInput
     {
         public abstract void Read(DataInput indexIn, bool absolute);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
index 60cbd18..5640fb2 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
@@ -189,13 +189,13 @@ namespace Lucene.Net.Codecs.Sep
 
         public override BlockTermState NewTermState()
         {
-            var state = new SepTermState {DOC_INDEX = _docIn.Index()};
+            var state = new SepTermState {DOC_INDEX = _docIn.GetIndex()};
 
             if (_freqIn != null)
-                state.FREQ_INDEX = _freqIn.Index();
+                state.FREQ_INDEX = _freqIn.GetIndex();
 
             if (_posIn != null)
-                state.POS_INDEX = _posIn.Index();
+                state.POS_INDEX = _posIn.GetIndex();
 
             return state;
         }
@@ -326,19 +326,19 @@ namespace Lucene.Net.Codecs.Sep
             internal SepDocsEnum(SepPostingsReader outerInstance)
             {
                 _outerInstance = outerInstance;
-                _docReader = outerInstance._docIn.Reader();
-                _docIndex = outerInstance._docIn.Index();
+                _docReader = outerInstance._docIn.GetReader();
+                _docIndex = outerInstance._docIn.GetIndex();
                 if (outerInstance._freqIn != null)
                 {
-                    _freqReader = outerInstance._freqIn.Reader();
-                    _freqIndex = outerInstance._freqIn.Index();
+                    _freqReader = outerInstance._freqIn.GetReader();
+                    _freqIndex = outerInstance._freqIn.GetIndex();
                 }
                 else
                 {
                     _freqReader = null;
                     _freqIndex = null;
                 }
-                _posIndex = outerInstance._posIn != null ? outerInstance._posIn.Index() : null;
+                _posIndex = outerInstance._posIn != null ? outerInstance._posIn.GetIndex() : null;
 
                 START_DOC_IN = outerInstance._docIn;
             }
@@ -512,12 +512,12 @@ namespace Lucene.Net.Codecs.Sep
             internal SepDocsAndPositionsEnum(SepPostingsReader outerInstance)
             {
                 _outerInstance = outerInstance;
-                _docReader = outerInstance._docIn.Reader();
-                _docIndex = outerInstance._docIn.Index();
-                _freqReader = outerInstance._freqIn.Reader();
-                _freqIndex = outerInstance._freqIn.Index();
-                _posReader = outerInstance._posIn.Reader();
-                _posIndex = outerInstance._posIn.Index();
+                _docReader = outerInstance._docIn.GetReader();
+                _docIndex = outerInstance._docIn.GetIndex();
+                _freqReader = outerInstance._freqIn.GetReader();
+                _freqIndex = outerInstance._freqIn.GetIndex();
+                _posReader = outerInstance._posIn.GetReader();
+                _posIndex = outerInstance._posIn.GetIndex();
                 _payloadIn = (IndexInput) outerInstance._payloadIn.Clone();
 
                 START_DOC_IN = outerInstance._docIn;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
index 1491df4..40951f7 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
@@ -63,20 +63,20 @@ namespace Lucene.Net.Codecs.Sep
             for (var i = 0; i < maxSkipLevels; i++)
             {
                 if (freqIn != null)
-                    _freqIndex[i] = freqIn.Index();
+                    _freqIndex[i] = freqIn.GetIndex();
 
-                _docIndex[i] = docIn.Index();
+                _docIndex[i] = docIn.GetIndex();
 
                 if (posIn != null)
-                    _posIndex[i] = posIn.Index();
+                    _posIndex[i] = posIn.GetIndex();
             }
 
             _payloadPointer = new long[maxSkipLevels];
             _payloadLength = new int[maxSkipLevels];
 
-            _lastFreqIndex = freqIn != null ? freqIn.Index() : null;
-            _lastDocIndex = docIn.Index();
-            _lastPosIndex = posIn != null ? posIn.Index() : null;
+            _lastFreqIndex = freqIn != null ? freqIn.GetIndex() : null;
+            _lastDocIndex = docIn.GetIndex();
+            _lastPosIndex = posIn != null ? posIn.GetIndex() : null;
         }
 
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
index 6d28cc5..55f257a 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Codecs.MockSep
                           MockSingleIntIndexOutput.VERSION_START);
         }
 
-        public override IntIndexInputReader Reader()
+        public override IntIndexInputReader GetReader()
         {
             return new MockReader((IndexInput)@in.Clone());
         }
@@ -110,7 +110,7 @@ namespace Lucene.Net.Codecs.MockSep
                 return other;
             }
         }
-        public override IntIndexInputIndex Index()
+        public override IntIndexInputIndex GetIndex()
         {
             return new MockSingleIntIndexInputIndex();
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e17cce9c/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
index f84ac9a..aef9339 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Codecs.IntBlock
             @out.Dispose();
 
             IntIndexInput @in = f.OpenInput(dir, "test", NewIOContext(Random()));
-            IntIndexInputReader r = @in.Reader();
+            IntIndexInputReader r = @in.GetReader();
 
             for (int i = 0; i < 11777; i++)
             {
@@ -63,7 +63,7 @@ namespace Lucene.Net.Codecs.IntBlock
             @out.Dispose();
 
             IntIndexInput @in = f.OpenInput(dir, "test", NewIOContext(Random()));
-            @in.Reader();
+            @in.GetReader();
             // read no ints
             @in.Dispose();
             dir.Dispose();


[16/37] lucenenet git commit: Lucene.Net.Codecs.Sep.IntIndexOutput refactor: Renamed IntIndexOutputIndex > AbstractIndex, nested it within IntIndexOutput, and renamed subclasses OutputIndex > Index

Posted by ni...@apache.org.
Lucene.Net.Codecs.Sep.IntIndexOutput refactor: Renamed IntIndexOutputIndex > AbstractIndex, nested it within IntIndexOutput, and renamed subclasses OutputIndex > Index


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

Branch: refs/heads/api-work
Commit: d534f6311e31ffaffcc85069b692595fa4fa2330
Parents: 13ba9d3
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 15:48:24 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:22 2017 +0700

----------------------------------------------------------------------
 .../Intblock/FixedIntBlockIndexOutput.cs        | 12 +++----
 .../Intblock/VariableIntBlockIndexOutput.cs     | 12 +++----
 src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs     | 37 +++++++++-----------
 src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs  | 30 ++++++++--------
 src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs  | 24 ++++++-------
 .../Codecs/MockSep/MockSingleIntIndexOutput.cs  |  6 ++--
 6 files changed, 59 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d534f631/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
index 1a3239c..1f106b3 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
@@ -54,16 +54,16 @@ namespace Lucene.Net.Codecs.IntBlock
 
         protected abstract void FlushBlock();
 
-        public override IntIndexOutputIndex Index()
+        public override AbstractIndex GetIndex()
         {
-            return new OutputIndex(this);
+            return new Index(this);
         }
 
-        private class OutputIndex : IntIndexOutputIndex // LUCENENET TODO: Rename Index
+        private class Index : AbstractIndex
         {
             private readonly FixedIntBlockIndexOutput outerInstance;
 
-            public OutputIndex(FixedIntBlockIndexOutput outerInstance)
+            public Index(FixedIntBlockIndexOutput outerInstance)
             {
                 this.outerInstance = outerInstance;
             }
@@ -79,9 +79,9 @@ namespace Lucene.Net.Codecs.IntBlock
                 upto = outerInstance.upto;
             }
 
-            public override void CopyFrom(IntIndexOutputIndex other, bool copyLast)
+            public override void CopyFrom(AbstractIndex other, bool copyLast)
             {
-                OutputIndex idx = (OutputIndex)other;
+                Index idx = (Index)other;
                 fp = idx.fp;
                 upto = idx.upto;
                 if (copyLast)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d534f631/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
index 82688b1..415a974 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
@@ -67,16 +67,16 @@ namespace Lucene.Net.Codecs.IntBlock
         /// </summary>
         protected abstract int Add(int value);
 
-        public override IntIndexOutputIndex Index()
+        public override AbstractIndex GetIndex()
         {
-            return new OutputIndex(this);
+            return new Index(this);
         }
 
-        private class OutputIndex : IntIndexOutputIndex // LUCENENET TODO: Rename Index
+        private class Index : AbstractIndex
         {
             private readonly VariableIntBlockIndexOutput outerInstance;
 
-            public OutputIndex(VariableIntBlockIndexOutput outerInstance)
+            public Index(VariableIntBlockIndexOutput outerInstance)
             {
                 this.outerInstance = outerInstance;
             }
@@ -92,9 +92,9 @@ namespace Lucene.Net.Codecs.IntBlock
                 upto = outerInstance.upto;
             }
 
-            public override void CopyFrom(IntIndexOutputIndex other, bool copyLast)
+            public override void CopyFrom(AbstractIndex other, bool copyLast)
             {
-                OutputIndex idx = (OutputIndex)other;
+                Index idx = (Index)other;
                 fp = idx.fp;
                 upto = idx.upto;
                 if (copyLast)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d534f631/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs b/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
index aca46c2..a374b80 100644
--- a/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
@@ -40,31 +40,28 @@ namespace Lucene.Net.Codecs.Sep
         /// </summary>
         public abstract void Write(int v);
 
+        /// <summary>Records a single skip-point in the IndexOutput. </summary>
+        public abstract class AbstractIndex
+        {
+            /// <summary>Internally records the current location </summary>
+            public abstract void Mark();
+
+            /// <summary>Copies index from other </summary>
+            public abstract void CopyFrom(AbstractIndex other, bool copyLast);
+
+            /// <summary>
+            /// Writes "location" of current output pointer of primary
+            ///  output to different output (out) 
+            /// </summary>
+            public abstract void Write(DataOutput indexOut, bool absolute);
+        }
+
         /// <summary>
         /// If you are indexing the primary output file, call
         ///  this and interact with the returned IndexWriter. 
         /// </summary>
-        public abstract IntIndexOutputIndex Index(); // LUCENENET TODO: Rename GetIndex()
+        public abstract AbstractIndex GetIndex();
 
         public abstract void Dispose(); // LUCENENET TODO: Implement disposable pattern
     }
-
-
-    /// <summary>Records a single skip-point in the IndexOutput. </summary>
-    public abstract class IntIndexOutputIndex // LUCENENET TODO: Rename AbstractIndex and nest within IntIndexOutput
-    {
-
-        /// <summary>Internally records the current location </summary>
-        public abstract void Mark();
-
-        /// <summary>Copies index from other </summary>
-        public abstract void CopyFrom(IntIndexOutputIndex other, bool copyLast);
-
-        /// <summary>
-        /// Writes "location" of current output pointer of primary
-        ///  output to different output (out) 
-        /// </summary>
-        public abstract void Write(DataOutput indexOut, bool absolute);
-    }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d534f631/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
index 280d048..fe0a000 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
@@ -43,13 +43,13 @@ namespace Lucene.Net.Codecs.Sep
         internal const int VERSION_CURRENT = VERSION_START;
 
         internal IntIndexOutput freqOut;
-        internal IntIndexOutputIndex freqIndex;
+        internal IntIndexOutput.AbstractIndex freqIndex;
 
         internal IntIndexOutput posOut;
-        internal IntIndexOutputIndex posIndex;
+        internal IntIndexOutput.AbstractIndex posIndex;
 
         internal IntIndexOutput docOut;
-        internal IntIndexOutputIndex docIndex;
+        internal IntIndexOutput.AbstractIndex docIndex;
 
         internal IndexOutput payloadOut;
 
@@ -116,20 +116,20 @@ namespace Lucene.Net.Codecs.Sep
                 var docFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, DOC_EXTENSION);
 
                 docOut = factory.CreateOutput(state.Directory, docFileName, state.Context);
-                docIndex = docOut.Index();
+                docIndex = docOut.GetIndex();
 
                 if (state.FieldInfos.HasFreq)
                 {
                     var frqFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, FREQ_EXTENSION);
                     freqOut = factory.CreateOutput(state.Directory, frqFileName, state.Context);
-                    freqIndex = freqOut.Index();
+                    freqIndex = freqOut.GetIndex();
                 }
 
                 if (state.FieldInfos.HasProx)
                 {
                     var posFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, POS_EXTENSION);
                     posOut = factory.CreateOutput(state.Directory, posFileName, state.Context);
-                    posIndex = posOut.Index();
+                    posIndex = posOut.GetIndex();
 
                     // TODO: -- only if at least one field stores payloads?
                     var payloadFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,PAYLOAD_EXTENSION);
@@ -211,13 +211,13 @@ namespace Lucene.Net.Codecs.Sep
 
         private SepTermState SetEmptyState()
         {
-            var emptyState = new SepTermState {DocIndex = docOut.Index()};
+            var emptyState = new SepTermState {DocIndex = docOut.GetIndex()};
             if (indexOptions != IndexOptions.DOCS_ONLY)
             {
-                emptyState.FreqIndex = freqOut.Index();
+                emptyState.FreqIndex = freqOut.GetIndex();
                 if (indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
                 {
-                    emptyState.PosIndex = posOut.Index();
+                    emptyState.PosIndex = posOut.GetIndex();
                 }
             }
             emptyState.PayloadFp = 0;
@@ -302,9 +302,9 @@ namespace Lucene.Net.Codecs.Sep
 
         private class SepTermState : BlockTermState
         {
-            public IntIndexOutputIndex DocIndex { get; set; }
-            public IntIndexOutputIndex FreqIndex { get; set; }
-            public IntIndexOutputIndex PosIndex { get; set; }
+            public IntIndexOutput.AbstractIndex DocIndex { get; set; }
+            public IntIndexOutput.AbstractIndex FreqIndex { get; set; }
+            public IntIndexOutput.AbstractIndex PosIndex { get; set; }
             public long PayloadFp { get; set; }
             public long SkipFp { get; set; }
         }
@@ -317,15 +317,15 @@ namespace Lucene.Net.Codecs.Sep
             Debug.Assert(state.DocFreq > 0);
             Debug.Assert(state.DocFreq == df);
 
-            state.DocIndex = docOut.Index();
+            state.DocIndex = docOut.GetIndex();
             state.DocIndex.CopyFrom(docIndex, false);
             if (indexOptions != IndexOptions.DOCS_ONLY)
             {
-                state.FreqIndex = freqOut.Index();
+                state.FreqIndex = freqOut.GetIndex();
                 state.FreqIndex.CopyFrom(freqIndex, false);
                 if (indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
                 {
-                    state.PosIndex = posOut.Index();
+                    state.PosIndex = posOut.GetIndex();
                     state.PosIndex.CopyFrom(posIndex, false);
                 }
                 else

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d534f631/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
index 13f9529..30ac97b 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
@@ -38,9 +38,9 @@ namespace Lucene.Net.Codecs.Sep
         private readonly int[] _lastSkipPayloadLength;
         private readonly long[] _lastSkipPayloadPointer;
 
-        private readonly IntIndexOutputIndex[] _docIndex;
-        private readonly IntIndexOutputIndex[] _freqIndex;
-        private readonly IntIndexOutputIndex[] _posIndex;
+        private readonly IntIndexOutput.AbstractIndex[] _docIndex;
+        private readonly IntIndexOutput.AbstractIndex[] _freqIndex;
+        private readonly IntIndexOutput.AbstractIndex[] _posIndex;
 
         private readonly IntIndexOutput _freqOutput;
         private IntIndexOutput _posOutput;
@@ -65,20 +65,20 @@ namespace Lucene.Net.Codecs.Sep
             // TODO: -- also cutover normal IndexOutput to use getIndex()?
             _lastSkipPayloadPointer = new long[numberOfSkipLevels];
 
-            _freqIndex = new IntIndexOutputIndex[numberOfSkipLevels];
-            _docIndex = new IntIndexOutputIndex[numberOfSkipLevels];
-            _posIndex = new IntIndexOutputIndex[numberOfSkipLevels];
+            _freqIndex = new IntIndexOutput.AbstractIndex[numberOfSkipLevels];
+            _docIndex = new IntIndexOutput.AbstractIndex[numberOfSkipLevels];
+            _posIndex = new IntIndexOutput.AbstractIndex[numberOfSkipLevels];
 
             for (var i = 0; i < numberOfSkipLevels; i++)
             {
                 if (freqOutput != null)
                 {
-                    _freqIndex[i] = freqOutput.Index();
+                    _freqIndex[i] = freqOutput.GetIndex();
                 }
-                _docIndex[i] = docOutput.Index();
+                _docIndex[i] = docOutput.GetIndex();
                 if (posOutput != null)
                 {
-                    _posIndex[i] = posOutput.Index();
+                    _posIndex[i] = posOutput.GetIndex();
                 }
             }
         }
@@ -97,7 +97,7 @@ namespace Lucene.Net.Codecs.Sep
                 _posOutput = value;
                 for (var i = 0; i < m_numberOfSkipLevels; i++)
                 {
-                    _posIndex[i] = value.Index();
+                    _posIndex[i] = value.GetIndex();
                 }
             }
         }
@@ -125,8 +125,8 @@ namespace Lucene.Net.Codecs.Sep
         /// <summary>
         /// Called @ start of new term
         /// </summary>
-        protected internal virtual void ResetSkip(IntIndexOutputIndex topDocIndex, IntIndexOutputIndex topFreqIndex,
-            IntIndexOutputIndex topPosIndex)
+        protected internal virtual void ResetSkip(IntIndexOutput.AbstractIndex topDocIndex, IntIndexOutput.AbstractIndex topFreqIndex,
+            IntIndexOutput.AbstractIndex topPosIndex)
         {
             base.ResetSkip();
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d534f631/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexOutput.cs b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexOutput.cs
index 5e6b7df..13b0996 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexOutput.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexOutput.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Codecs.MockSep
             @out.WriteVInt(v);
         }
 
-        public override IntIndexOutputIndex Index()
+        public override AbstractIndex GetIndex()
         {
             return new MockSingleIntIndexOutputIndex(this);
         }
@@ -55,7 +55,7 @@ namespace Lucene.Net.Codecs.MockSep
             return "MockSingleIntIndexOutput fp=" + @out.FilePointer;
         }
 
-        private class MockSingleIntIndexOutputIndex : IntIndexOutputIndex
+        private class MockSingleIntIndexOutputIndex : AbstractIndex
         {
             internal long fp;
             internal long lastFP;
@@ -71,7 +71,7 @@ namespace Lucene.Net.Codecs.MockSep
                 fp = outerClass.@out.FilePointer;
             }
 
-            public override void CopyFrom(IntIndexOutputIndex other, bool copyLast)
+            public override void CopyFrom(AbstractIndex other, bool copyLast)
             {
                 fp = ((MockSingleIntIndexOutputIndex)other).fp;
                 if (copyLast)


[24/37] lucenenet git commit: Lucene.Net.Codecs: Removed unnecessary HashMapHelperClass

Posted by ni...@apache.org.
Lucene.Net.Codecs: Removed unnecessary HashMapHelperClass


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

Branch: refs/heads/api-work
Commit: 87a256e9f88d0e1811fb464c34623facdcbff9bb
Parents: 5524a91
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 16:34:03 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:25 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/HashMapHelperClass.cs     | 28 --------------------
 src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj  |  1 -
 .../Memory/DirectPostingsFormat.cs              |  2 +-
 3 files changed, 1 insertion(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/87a256e9/src/Lucene.Net.Codecs/HashMapHelperClass.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/HashMapHelperClass.cs b/src/Lucene.Net.Codecs/HashMapHelperClass.cs
deleted file mode 100644
index b5caf41..0000000
--- a/src/Lucene.Net.Codecs/HashMapHelperClass.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-\ufeff//---------------------------------------------------------------------------------------------------------
-//	Copyright � 2007 - 2014 Tangible Software Solutions Inc.
-//	This class can be used by anyone provided that the copyright notice remains intact.
-//
-//	This class is used to replace calls to some Java HashMap or Hashtable methods.
-//---------------------------------------------------------------------------------------------------------
-using System.Collections.Generic;
-
-// LUCENENET TODO: Remove this class
-internal static class HashMapHelperClass
-{
-	internal static HashSet<KeyValuePair<TKey, TValue>> SetOfKeyValuePairs<TKey, TValue>(this IDictionary<TKey, TValue> dictionary) 
-	{
-		HashSet<KeyValuePair<TKey, TValue>> entries = new HashSet<KeyValuePair<TKey, TValue>>();
-		foreach (KeyValuePair<TKey, TValue> keyValuePair in dictionary)
-		{
-			entries.Add(keyValuePair);
-		}
-		return entries;
-	}
-
-	internal static TValue GetValueOrNull<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
-	{
-		TValue ret;
-		dictionary.TryGetValue(key, out ret);
-		return ret;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/87a256e9/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
index a0e850b..aff960b 100644
--- a/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
+++ b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
@@ -61,7 +61,6 @@
     <Compile Include="DiskDV\DiskDocValuesFormat.cs" />
     <Compile Include="DiskDV\DiskDocValuesProducer.cs" />
     <Compile Include="DiskDV\DiskNormsFormat.cs" />
-    <Compile Include="HashMapHelperClass.cs" />
     <Compile Include="IntBlock\FixedIntBlockIndexInput.cs" />
     <Compile Include="IntBlock\FixedIntBlockIndexOutput.cs" />
     <Compile Include="IntBlock\VariableIntBlockIndexInput.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/87a256e9/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
index ff4a327..347891c 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
@@ -174,7 +174,7 @@ namespace Lucene.Net.Codecs.Memory
             public override long RamBytesUsed()
             {
                 long sizeInBytes = 0;
-                foreach (KeyValuePair<string, DirectField> entry in fields.SetOfKeyValuePairs())
+                foreach (KeyValuePair<string, DirectField> entry in fields)
                 {
                     sizeInBytes += entry.Key.Length*RamUsageEstimator.NUM_BYTES_CHAR;
                     sizeInBytes += entry.Value.RamBytesUsed();


[30/37] lucenenet git commit: Lucene.Net.Codecs: Renamed protected fields camelCase prefixed with m_

Posted by ni...@apache.org.
Lucene.Net.Codecs: Renamed protected fields camelCase prefixed with m_


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

Branch: refs/heads/api-work
Commit: 76605096154eb6270c6bf51f99a408f17e59799e
Parents: f46d372
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 17:34:24 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:34:24 2017 +0700

----------------------------------------------------------------------
 .../BlockTerms/BlockTermsWriter.cs              | 64 ++++++++++----------
 .../BlockTerms/FixedGapTermsIndexWriter.cs      | 50 +++++++--------
 .../BlockTerms/VariableGapTermsIndexWriter.cs   | 30 ++++-----
 .../Intblock/FixedIntBlockIndexInput.cs         |  8 +--
 .../Intblock/FixedIntBlockIndexOutput.cs        | 14 ++---
 .../Intblock/VariableIntBlockIndexInput.cs      | 10 +--
 .../Intblock/VariableIntBlockIndexOutput.cs     | 10 +--
 .../MockFixedIntBlockPostingsFormat.cs          |  4 +-
 .../MockVariableIntBlockPostingsFormat.cs       |  2 +-
 9 files changed, 96 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/76605096/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
index d7d94ce..f3b6846 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
@@ -48,7 +48,7 @@ namespace Lucene.Net.Codecs.BlockTerms
         /// <summary>Extension of terms file</summary>
         public const string TERMS_EXTENSION = "tib";
 
-        protected IndexOutput _output;
+        protected IndexOutput m_output;
         private readonly PostingsWriterBase postingsWriter;
         private readonly FieldInfos fieldInfos;
         private FieldInfo currentField;
@@ -87,24 +87,24 @@ namespace Lucene.Net.Codecs.BlockTerms
             var termsFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,
                 TERMS_EXTENSION);
             this.termsIndexWriter = termsIndexWriter;
-            _output = state.Directory.CreateOutput(termsFileName, state.Context);
+            m_output = state.Directory.CreateOutput(termsFileName, state.Context);
             var success = false;
 
             try
             {
                 fieldInfos = state.FieldInfos;
-                WriteHeader(_output);
+                WriteHeader(m_output);
                 currentField = null;
                 this.postingsWriter = postingsWriter;
 
-                postingsWriter.Init(_output); // have consumer write its format/header
+                postingsWriter.Init(m_output); // have consumer write its format/header
                 success = true;
             }
             finally
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(_output);
+                    IOUtils.CloseWhileHandlingException(m_output);
                 }
             }
         }
@@ -119,50 +119,50 @@ namespace Lucene.Net.Codecs.BlockTerms
             Debug.Assert(currentField == null || currentField.Name.CompareTo(field.Name) < 0);
 
             currentField = field;
-            var fiw = termsIndexWriter.AddField(field, _output.FilePointer);
+            var fiw = termsIndexWriter.AddField(field, m_output.FilePointer);
             return new TermsWriter(this, fiw, field, postingsWriter);
         }
 
         public override void Dispose()
         {
-            if (_output == null) return;
+            if (m_output == null) return;
 
             try
             {
-                var dirStart = _output.FilePointer;
+                var dirStart = m_output.FilePointer;
 
-                _output.WriteVInt(_fields.Count);
+                m_output.WriteVInt(_fields.Count);
 
                 foreach (var field in _fields)
                 {
-                    _output.WriteVInt(field.FieldInfo.Number);
-                    _output.WriteVLong(field.NumTerms);
-                    _output.WriteVLong(field.TermsStartPointer);
+                    m_output.WriteVInt(field.FieldInfo.Number);
+                    m_output.WriteVLong(field.NumTerms);
+                    m_output.WriteVLong(field.TermsStartPointer);
                     if (field.FieldInfo.IndexOptions != IndexOptions.DOCS_ONLY)
                     {
-                        _output.WriteVLong(field.SumTotalTermFreq);
+                        m_output.WriteVLong(field.SumTotalTermFreq);
                     }
-                    _output.WriteVLong(field.SumDocFreq);
-                    _output.WriteVInt(field.DocCount);
+                    m_output.WriteVLong(field.SumDocFreq);
+                    m_output.WriteVInt(field.DocCount);
                     if (VERSION_CURRENT >= VERSION_META_ARRAY)
                     {
-                        _output.WriteVInt(field.LongsSize);
+                        m_output.WriteVInt(field.LongsSize);
                     }
 
                 }
                 WriteTrailer(dirStart);
-                CodecUtil.WriteFooter(_output);
+                CodecUtil.WriteFooter(m_output);
             }
             finally
             {
-                IOUtils.Close(_output, postingsWriter, termsIndexWriter);
-                _output = null;
+                IOUtils.Close(m_output, postingsWriter, termsIndexWriter);
+                m_output = null;
             }
         }
 
         private void WriteTrailer(long dirStart)
         {
-            _output.WriteLong(dirStart);
+            m_output.WriteLong(dirStart);
         }
 
         private class TermEntry
@@ -204,7 +204,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 {
                     _pendingTerms[i] = new TermEntry();
                 }
-                _termsStartPointer = this.outerInstance._output.FilePointer;
+                _termsStartPointer = this.outerInstance.m_output.FilePointer;
                 _postingsWriter = postingsWriter;
                 _longsSize = postingsWriter.SetField(fieldInfo);
             }
@@ -237,7 +237,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                         // entire block in between index terms:
                         FlushBlock();
                     }
-                    _fieldIndexWriter.Add(text, stats, outerInstance._output.FilePointer);
+                    _fieldIndexWriter.Add(text, stats, outerInstance.m_output.FilePointer);
                 }
 
                 if (_pendingTerms.Length == _pendingCount)
@@ -271,12 +271,12 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
 
                 // EOF marker:
-                outerInstance._output.WriteVInt(0);
+                outerInstance.m_output.WriteVInt(0);
 
                 _sumTotalTermFreq = sumTotalTermFreq;
                 _sumDocFreq = sumDocFreq;
                 _docCount = docCount;
-                _fieldIndexWriter.Finish(outerInstance._output.FilePointer);
+                _fieldIndexWriter.Finish(outerInstance.m_output.FilePointer);
 
                 if (_numTerms > 0)
                 {
@@ -329,8 +329,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                             _pendingTerms[termCount].Term));
                 }
 
-                outerInstance._output.WriteVInt(_pendingCount);
-                outerInstance._output.WriteVInt(commonPrefix);
+                outerInstance.m_output.WriteVInt(_pendingCount);
+                outerInstance.m_output.WriteVInt(commonPrefix);
 
                 // 2nd pass: write suffixes, as separate byte[] blob
                 for (var termCount = 0; termCount < _pendingCount; termCount++)
@@ -341,8 +341,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                     _bytesWriter.WriteVInt(suffix);
                     _bytesWriter.WriteBytes(_pendingTerms[termCount].Term.Bytes, commonPrefix, suffix);
                 }
-                outerInstance._output.WriteVInt((int)_bytesWriter.FilePointer);
-                _bytesWriter.WriteTo(outerInstance._output);
+                outerInstance.m_output.WriteVInt((int)_bytesWriter.FilePointer);
+                _bytesWriter.WriteTo(outerInstance.m_output);
                 _bytesWriter.Reset();
 
                 // 3rd pass: write the freqs as byte[] blob
@@ -360,8 +360,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                         _bytesWriter.WriteVLong(state.TotalTermFreq - state.DocFreq);
                     }
                 }
-                outerInstance._output.WriteVInt((int)_bytesWriter.FilePointer);
-                _bytesWriter.WriteTo(outerInstance._output);
+                outerInstance.m_output.WriteVInt((int)_bytesWriter.FilePointer);
+                _bytesWriter.WriteTo(outerInstance.m_output);
                 _bytesWriter.Reset();
 
                 // 4th pass: write the metadata 
@@ -379,8 +379,8 @@ namespace Lucene.Net.Codecs.BlockTerms
                     _bufferWriter.Reset();
                     absolute = false;
                 }
-                outerInstance._output.WriteVInt((int)_bytesWriter.FilePointer);
-                _bytesWriter.WriteTo(outerInstance._output);
+                outerInstance.m_output.WriteVInt((int)_bytesWriter.FilePointer);
+                _bytesWriter.WriteTo(outerInstance.m_output);
                 _bytesWriter.Reset();
 
                 _lastPrevTerm.CopyBytes(_pendingTerms[_pendingCount - 1].Term);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/76605096/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
index 038e42c..b202a57 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
@@ -37,7 +37,7 @@ namespace Lucene.Net.Codecs.BlockTerms
     /// </summary>
     public class FixedGapTermsIndexWriter : TermsIndexWriterBase
     {
-        protected IndexOutput Output; // out
+        protected IndexOutput m_output;
 
         /// <summary>Extension of terms index file</summary>
         internal const string TERMS_INDEX_EXTENSION = "tii";
@@ -58,20 +58,20 @@ namespace Lucene.Net.Codecs.BlockTerms
             string indexFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,
                 TERMS_INDEX_EXTENSION);
             _termIndexInterval = state.TermIndexInterval;
-            Output = state.Directory.CreateOutput(indexFileName, state.Context);
+            m_output = state.Directory.CreateOutput(indexFileName, state.Context);
             bool success = false;
             try
             {
                 _fieldInfos = state.FieldInfos;
-                WriteHeader(Output);
-                Output.WriteInt(_termIndexInterval);
+                WriteHeader(m_output);
+                m_output.WriteInt(_termIndexInterval);
                 success = true;
             }
             finally
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(Output);
+                    IOUtils.CloseWhileHandlingException(m_output);
                 }
             }
         }
@@ -137,7 +137,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 this.outerInstance = outerInstance;
                 this.fieldInfo = fieldInfo;
-                indexStart = outerInstance.Output.FilePointer;
+                indexStart = outerInstance.m_output.FilePointer;
                 termsStart = lastTermsPointer = termsFilePointer;
                 termLengths = new short[0];
                 termsPointerDeltas = new int[0];
@@ -164,7 +164,7 @@ namespace Lucene.Net.Codecs.BlockTerms
 
                 // write only the min prefix that shows the diff
                 // against prior term
-                outerInstance.Output.WriteBytes(text.Bytes, text.Offset, indexedTermLength);
+                outerInstance.m_output.WriteBytes(text.Bytes, text.Offset, indexedTermLength);
 
                 if (termLengths.Length == numIndexTerms)
                 {
@@ -191,9 +191,9 @@ namespace Lucene.Net.Codecs.BlockTerms
             public override void Finish(long termsFilePointer)
             {
                 // write primary terms dict offsets
-                packedIndexStart = outerInstance.Output.FilePointer;
+                packedIndexStart = outerInstance.m_output.FilePointer;
 
-                PackedInts.Writer w = PackedInts.GetWriter(outerInstance.Output, numIndexTerms,
+                PackedInts.Writer w = PackedInts.GetWriter(outerInstance.m_output, numIndexTerms,
                     PackedInts.BitsRequired(termsFilePointer),
                     PackedInts.DEFAULT);
 
@@ -206,10 +206,10 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
                 w.Finish();
 
-                packedOffsetsStart = outerInstance.Output.FilePointer;
+                packedOffsetsStart = outerInstance.m_output.FilePointer;
 
                 // write offsets into the byte[] terms
-                w = PackedInts.GetWriter(outerInstance.Output, 1 + numIndexTerms, PackedInts.BitsRequired(totTermLength),
+                w = PackedInts.GetWriter(outerInstance.m_output, 1 + numIndexTerms, PackedInts.BitsRequired(totTermLength),
                     PackedInts.DEFAULT);
                 upto = 0;
                 for (int i = 0; i < numIndexTerms; i++)
@@ -229,12 +229,12 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         public override void Dispose()
         {
-            if (Output != null)
+            if (m_output != null)
             {
                 bool success = false;
                 try
                 {
-                    long dirStart = Output.FilePointer;
+                    long dirStart = m_output.FilePointer;
                     int fieldCount = _fields.Count;
 
                     int nonNullFieldCount = 0;
@@ -247,42 +247,42 @@ namespace Lucene.Net.Codecs.BlockTerms
                         }
                     }
 
-                    Output.WriteVInt(nonNullFieldCount);
+                    m_output.WriteVInt(nonNullFieldCount);
                     for (int i = 0; i < fieldCount; i++)
                     {
                         SimpleFieldWriter field = _fields[i];
                         if (field.numIndexTerms > 0)
                         {
-                            Output.WriteVInt(field.fieldInfo.Number);
-                            Output.WriteVInt(field.numIndexTerms);
-                            Output.WriteVLong(field.termsStart);
-                            Output.WriteVLong(field.indexStart);
-                            Output.WriteVLong(field.packedIndexStart);
-                            Output.WriteVLong(field.packedOffsetsStart);
+                            m_output.WriteVInt(field.fieldInfo.Number);
+                            m_output.WriteVInt(field.numIndexTerms);
+                            m_output.WriteVLong(field.termsStart);
+                            m_output.WriteVLong(field.indexStart);
+                            m_output.WriteVLong(field.packedIndexStart);
+                            m_output.WriteVLong(field.packedOffsetsStart);
                         }
                     }
                     WriteTrailer(dirStart);
-                    CodecUtil.WriteFooter(Output);
+                    CodecUtil.WriteFooter(m_output);
                     success = true;
                 }
                 finally
                 {
                     if (success)
                     {
-                        IOUtils.Close(Output);
+                        IOUtils.Close(m_output);
                     }
                     else
                     {
-                        IOUtils.CloseWhileHandlingException(Output);
+                        IOUtils.CloseWhileHandlingException(m_output);
                     }
-                    Output = null;
+                    m_output = null;
                 }
             }
         }
 
         private void WriteTrailer(long dirStart)
         {
-            Output.WriteLong(dirStart);
+            m_output.WriteLong(dirStart);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/76605096/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
index 2426546..296dc20 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
@@ -38,7 +38,7 @@ namespace Lucene.Net.Codecs.BlockTerms
     /// </summary>
     public class VariableGapTermsIndexWriter : TermsIndexWriterBase
     {
-        protected IndexOutput Output; // out
+        protected IndexOutput m_output;
 
         /** Extension of terms index file */
         internal const string TERMS_INDEX_EXTENSION = "tiv";
@@ -177,19 +177,19 @@ namespace Lucene.Net.Codecs.BlockTerms
         {
             string indexFileName = IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix,
                 TERMS_INDEX_EXTENSION);
-            Output = state.Directory.CreateOutput(indexFileName, state.Context);
+            m_output = state.Directory.CreateOutput(indexFileName, state.Context);
             bool success = false;
 
             try
             {
                 _policy = policy;
-                WriteHeader(Output);
+                WriteHeader(m_output);
                 success = true;
             }
             finally
             {
                 if (!success)
-                    IOUtils.CloseWhileHandlingException(Output);
+                    IOUtils.CloseWhileHandlingException(m_output);
             }
         }
 
@@ -251,7 +251,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 FieldInfo = fieldInfo;
                 PositiveIntOutputs fstOutputs = PositiveIntOutputs.Singleton;
                 _fstBuilder = new Builder<long?>(FST.INPUT_TYPE.BYTE1, fstOutputs);
-                IndexStart = this.outerInstance.Output.FilePointer;
+                IndexStart = this.outerInstance.m_output.FilePointer;
 
                 // Always put empty string in
                 _fstBuilder.Add(new IntsRef(), termsFilePointer);
@@ -299,17 +299,17 @@ namespace Lucene.Net.Codecs.BlockTerms
             {
                 Fst = _fstBuilder.Finish();
                 if (Fst != null)
-                    Fst.Save(outerInstance.Output);
+                    Fst.Save(outerInstance.m_output);
             }
         }
 
         public override void Dispose()
         {
-            if (Output == null) return;
+            if (m_output == null) return;
 
             try
             {
-                long dirStart = Output.FilePointer;
+                long dirStart = m_output.FilePointer;
                 int fieldCount = _fields.Count;
 
                 int nonNullFieldCount = 0;
@@ -322,29 +322,29 @@ namespace Lucene.Net.Codecs.BlockTerms
                     }
                 }
 
-                Output.WriteVInt(nonNullFieldCount);
+                m_output.WriteVInt(nonNullFieldCount);
                 for (int i = 0; i < fieldCount; i++)
                 {
                     FstFieldWriter field = _fields[i];
                     if (field.Fst != null)
                     {
-                        Output.WriteVInt(field.FieldInfo.Number);
-                        Output.WriteVLong(field.IndexStart);
+                        m_output.WriteVInt(field.FieldInfo.Number);
+                        m_output.WriteVLong(field.IndexStart);
                     }
                 }
                 WriteTrailer(dirStart);
-                CodecUtil.WriteFooter(Output);
+                CodecUtil.WriteFooter(m_output);
             }
             finally
             {
-                Output.Dispose();
-                Output = null;
+                m_output.Dispose();
+                m_output = null;
             }
         }
 
         private void WriteTrailer(long dirStart)
         {
-            Output.WriteLong(dirStart);
+            m_output.WriteLong(dirStart);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/76605096/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
index bf269a2..991b5f0 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
@@ -37,17 +37,17 @@ namespace Lucene.Net.Codecs.IntBlock
     public abstract class FixedIntBlockIndexInput : IntIndexInput
     {
         private readonly IndexInput input;
-        protected readonly int blockSize;
+        protected readonly int m_blockSize;
 
         public FixedIntBlockIndexInput(IndexInput @in)
         {
             input = @in;
-            blockSize = @in.ReadVInt();
+            m_blockSize = @in.ReadVInt();
         }
 
         public override AbstractReader GetReader()
         {
-            var buffer = new int[blockSize];
+            var buffer = new int[m_blockSize];
             var clone = (IndexInput)input.Clone();
             // TODO: can this be simplified?
             return new Reader(clone, buffer, GetBlockReader(clone, buffer));
@@ -164,7 +164,7 @@ namespace Lucene.Net.Codecs.IntBlock
                         fp += indexIn.ReadVLong();
                     }
                 }
-                Debug.Assert(upto < outerInstance.blockSize);
+                Debug.Assert(upto < outerInstance.m_blockSize);
             }
 
             public override void Seek(AbstractReader other)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/76605096/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
index 1f106b3..544b644 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
@@ -39,17 +39,17 @@ namespace Lucene.Net.Codecs.IntBlock
     /// </summary>
     public abstract class FixedIntBlockIndexOutput : IntIndexOutput
     {
-        protected readonly IndexOutput output; // out
+        protected readonly IndexOutput m_output;
         private readonly int blockSize;
-        protected readonly int[] buffer;
+        protected readonly int[] m_buffer;
         private int upto;
 
         protected FixedIntBlockIndexOutput(IndexOutput output, int fixedBlockSize)
         {
             blockSize = fixedBlockSize;
-            this.output = output;
+            this.m_output = output;
             output.WriteVInt(blockSize);
-            buffer = new int[blockSize];
+            m_buffer = new int[blockSize];
         }
 
         protected abstract void FlushBlock();
@@ -75,7 +75,7 @@ namespace Lucene.Net.Codecs.IntBlock
 
             public override void Mark()
             {
-                fp = outerInstance.output.FilePointer;
+                fp = outerInstance.m_output.FilePointer;
                 upto = outerInstance.upto;
             }
 
@@ -123,7 +123,7 @@ namespace Lucene.Net.Codecs.IntBlock
 
         public override void Write(int v)
         {
-            buffer[upto++] = v;
+            m_buffer[upto++] = v;
             if (upto == blockSize)
             {
                 FlushBlock();
@@ -144,7 +144,7 @@ namespace Lucene.Net.Codecs.IntBlock
             }
             finally
             {
-                output.Dispose();
+                m_output.Dispose();
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/76605096/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
index 55e02ba..f6a1557 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
@@ -38,18 +38,18 @@ namespace Lucene.Net.Codecs.IntBlock
     /// </summary>
     public abstract class VariableIntBlockIndexInput : IntIndexInput
     {
-        private readonly IndexInput input; // in
-        protected readonly int maxBlockSize;
+        private readonly IndexInput input;
+        protected readonly int m_maxBlockSize;
 
         protected internal VariableIntBlockIndexInput(IndexInput input)
         {
             this.input = input;
-            maxBlockSize = input.ReadInt();
+            m_maxBlockSize = input.ReadInt();
         }
 
         public override AbstractReader GetReader()
         {
-            var buffer = new int[maxBlockSize];
+            var buffer = new int[m_maxBlockSize];
             var clone = (IndexInput)input.Clone();
             // TODO: can this be simplified?
             return new Reader(clone, buffer, GetBlockReader(clone, buffer));
@@ -196,7 +196,7 @@ namespace Lucene.Net.Codecs.IntBlock
 
             public override string ToString()
             {
-                return "VarIntBlock.Index fp=" + fp + " upto=" + upto + " maxBlock=" + outerInstance.maxBlockSize;
+                return "VarIntBlock.Index fp=" + fp + " upto=" + upto + " maxBlock=" + outerInstance.m_maxBlockSize;
             }
 
             public override void Seek(AbstractReader other)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/76605096/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
index 415a974..f756777 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
@@ -41,7 +41,7 @@ namespace Lucene.Net.Codecs.IntBlock
     /// </summary>
     public abstract class VariableIntBlockIndexOutput : IntIndexOutput
     {
-        protected readonly IndexOutput output; // out
+        protected readonly IndexOutput m_output;
 
         private int upto;
         private bool hitExcDuringWrite;
@@ -57,8 +57,8 @@ namespace Lucene.Net.Codecs.IntBlock
         /// </summary>
         protected VariableIntBlockIndexOutput(IndexOutput output, int maxBlockSize)
         {
-            this.output = output;
-            this.output.WriteInt(maxBlockSize);
+            this.m_output = output;
+            this.m_output.WriteInt(maxBlockSize);
         }
 
         /// <summary>
@@ -88,7 +88,7 @@ namespace Lucene.Net.Codecs.IntBlock
 
             public override void Mark()
             {
-                fp = outerInstance.output.FilePointer;
+                fp = outerInstance.m_output.FilePointer;
                 upto = outerInstance.upto;
             }
 
@@ -155,7 +155,7 @@ namespace Lucene.Net.Codecs.IntBlock
             }
             finally
             {
-                output.Dispose();
+                m_output.Dispose();
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/76605096/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
index fc15dd0..224a385 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
@@ -142,9 +142,9 @@ namespace Lucene.Net.Codecs.IntBlock
             }
             protected override void FlushBlock()
             {
-                for (int i = 0; i < buffer.Length; i++)
+                for (int i = 0; i < m_buffer.Length; i++)
                 {
-                    output.WriteVInt(buffer[i]);
+                    m_output.WriteVInt(m_buffer[i]);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/76605096/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
index eeba725..ba69c73 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
@@ -164,7 +164,7 @@ namespace Lucene.Net.Codecs.IntBlock
                 {
                     for (int i = 0; i < flushAt; i++)
                     {
-                        output.WriteVInt(buffer[i]);
+                        m_output.WriteVInt(buffer[i]);
                     }
                     buffer[0] = buffer[flushAt];
                     pendingCount = 1;


[02/37] lucenenet git commit: Lucene.Net.Codecs: member accessibility

Posted by ni...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsFormat.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsFormat.cs
index 9ab1706..8f64077 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsFormat.cs
@@ -30,26 +30,21 @@ namespace Lucene.Net.Codecs.Pulsing
     /// </summary>
     public abstract class PulsingPostingsFormat : PostingsFormat
     {
-
         private readonly int _freqCutoff;
         private readonly int _minBlockSize;
         private readonly int _maxBlockSize;
         private readonly PostingsBaseFormat _wrappedPostingsBaseFormat;
 
-        public int FreqCutoff
-        {
-            get { return _freqCutoff; }
-        }
-
-        protected PulsingPostingsFormat(String name, PostingsBaseFormat wrappedPostingsBaseFormat, int freqCutoff) :
-            this(name, wrappedPostingsBaseFormat, freqCutoff, BlockTreeTermsWriter.DEFAULT_MIN_BLOCK_SIZE,
+        public PulsingPostingsFormat(string name, PostingsBaseFormat wrappedPostingsBaseFormat, int freqCutoff) 
+            : this(name, wrappedPostingsBaseFormat, freqCutoff, BlockTreeTermsWriter.DEFAULT_MIN_BLOCK_SIZE,
             BlockTreeTermsWriter.DEFAULT_MAX_BLOCK_SIZE)
         {
         }
 
         /// <summary>Terms with freq less than or equal freqCutoff are inlined into terms dict.</summary>
-        protected PulsingPostingsFormat(String name, PostingsBaseFormat wrappedPostingsBaseFormat, int freqCutoff,
-            int minBlockSize, int maxBlockSize) : base(name)
+        public PulsingPostingsFormat(string name, PostingsBaseFormat wrappedPostingsBaseFormat, int freqCutoff,
+            int minBlockSize, int maxBlockSize) 
+            : base(name)
         {
             Debug.Assert(minBlockSize > 1);
 
@@ -59,7 +54,7 @@ namespace Lucene.Net.Codecs.Pulsing
             _wrappedPostingsBaseFormat = wrappedPostingsBaseFormat;
         }
 
-        public override String ToString()
+        public override string ToString()
         {
             return string.Format("{0} (freqCutoff={1}, minBlockSize={2}, maxBlockSize={3})", Name, _freqCutoff, _minBlockSize, _maxBlockSize);
         }
@@ -121,5 +116,10 @@ namespace Lucene.Net.Codecs.Pulsing
                 }
             }
         }
+
+        public virtual int FreqCutoff
+        {
+            get { return _freqCutoff; }
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
index aaca6da..1e24672 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+using Lucene.Net.Support;
+
 namespace Lucene.Net.Codecs.Pulsing
 {
 
@@ -36,7 +38,6 @@ namespace Lucene.Net.Codecs.Pulsing
     /// </summary>
     public class PulsingPostingsReader : PostingsReaderBase
     {
-
         // Fallback reader for non-pulsed terms:
         private readonly PostingsReaderBase _wrappedPostingsReader;
         private readonly SegmentReadState _segmentState;
@@ -94,6 +95,66 @@ namespace Lucene.Net.Codecs.Pulsing
             }
         }
 
+        internal class PulsingTermState : BlockTermState
+        {
+            internal bool Absolute { get; set; }
+            [WritableArray]
+            internal long[] Longs { get; set; }
+            [WritableArray]
+            internal byte[] Postings { get; set; }
+            internal int PostingsSize { get; set; } // -1 if this term was not inlined
+            internal BlockTermState WrappedTermState { get; set; }
+
+            public override object Clone()
+            {
+                var clone = (PulsingTermState)base.Clone();
+                if (PostingsSize != -1)
+                {
+                    clone.Postings = new byte[PostingsSize];
+                    Array.Copy(Postings, 0, clone.Postings, 0, PostingsSize);
+                }
+                else
+                {
+                    Debug.Assert(WrappedTermState != null);
+                    clone.WrappedTermState = (BlockTermState)WrappedTermState.Clone();
+                    clone.Absolute = Absolute;
+
+                    if (Longs == null) return clone;
+
+                    clone.Longs = new long[Longs.Length];
+                    Array.Copy(Longs, 0, clone.Longs, 0, Longs.Length);
+                }
+                return clone;
+            }
+
+            public override void CopyFrom(TermState other)
+            {
+                base.CopyFrom(other);
+                var _other = (PulsingTermState)other;
+                PostingsSize = _other.PostingsSize;
+                if (_other.PostingsSize != -1)
+                {
+                    if (Postings == null || Postings.Length < _other.PostingsSize)
+                    {
+                        Postings = new byte[ArrayUtil.Oversize(_other.PostingsSize, 1)];
+                    }
+                    Array.Copy(_other.Postings, 0, Postings, 0, _other.PostingsSize);
+                }
+                else
+                {
+                    WrappedTermState.CopyFrom(_other.WrappedTermState);
+                }
+            }
+
+            public override string ToString()
+            {
+                if (PostingsSize == -1)
+                    return "PulsingTermState: not inlined: wrapped=" + WrappedTermState;
+
+                return "PulsingTermState: inlined size=" + PostingsSize + " " + base.ToString();
+            }
+        }
+
         public override BlockTermState NewTermState()
         {
             return new PulsingTermState {WrappedTermState = _wrappedPostingsReader.NewTermState()};
@@ -247,125 +308,7 @@ namespace Lucene.Net.Codecs.Pulsing
             return wrapped;
         }
 
-        public override long RamBytesUsed()
-        {
-            return ((_wrappedPostingsReader != null) ? _wrappedPostingsReader.RamBytesUsed() : 0);
-        }
-
-        public override void CheckIntegrity()
-        {
-            _wrappedPostingsReader.CheckIntegrity();
-        }
-
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing)
-            {
-                _wrappedPostingsReader.Dispose();
-            }
-        }
-        
-        /// <summary>
-        /// for a docsenum, gets the 'other' reused enum.
-        /// Example: Pulsing(Standard).
-        /// when doing a term range query you are switching back and forth
-        /// between Pulsing and Standard
-        ///  
-        /// The way the reuse works is that Pulsing.other = Standard and
-        /// Standard.other = Pulsing.
-        /// </summary>
-        private DocsEnum GetOther(DocsEnum de)
-        {
-            if (de == null)
-                return null;
-            
-            var atts = de.Attributes;
-            DocsEnum result;
-            atts.AddAttribute<IPulsingEnumAttribute>().Enums().TryGetValue(this, out result);
-            return result;
-        }
-
-        /// <summary>
-        /// for a docsenum, sets the 'other' reused enum.
-        /// see GetOther for an example.
-        /// </summary>
-        private DocsEnum SetOther(DocsEnum de, DocsEnum other)
-        {
-            var atts = de.Attributes;
-            return atts.AddAttribute<IPulsingEnumAttribute>().Enums()[this] = other;
-        }
-
-        ///<summary>
-        /// A per-docsenum attribute that stores additional reuse information
-        /// so that pulsing enums can keep a reference to their wrapped enums,
-        /// and vice versa. this way we can always reuse.
-        /// 
-        /// @lucene.internal 
-        /// </summary>
-        public interface IPulsingEnumAttribute : IAttribute
-        {
-            Dictionary<PulsingPostingsReader, DocsEnum> Enums(); // LUCENENET TODO: Make property, change to IDictionary
-        }
-
-        internal class PulsingTermState : BlockTermState
-        {
-            public bool Absolute { get; set; }
-            public long[] Longs { get; set; }
-            public byte[] Postings { get; set; }
-            public int PostingsSize { get; set; } // -1 if this term was not inlined
-            public BlockTermState WrappedTermState { get; set; }
-
-            public override object Clone()
-            {
-                var clone = (PulsingTermState) base.Clone();
-                if (PostingsSize != -1)
-                {
-                    clone.Postings = new byte[PostingsSize];
-                    Array.Copy(Postings, 0, clone.Postings, 0, PostingsSize);
-                }
-                else
-                {
-                    Debug.Assert(WrappedTermState != null);
-                    clone.WrappedTermState = (BlockTermState) WrappedTermState.Clone();
-                    clone.Absolute = Absolute;
-                    
-                    if (Longs == null) return clone;
-
-                    clone.Longs = new long[Longs.Length];
-                    Array.Copy(Longs, 0, clone.Longs, 0, Longs.Length);
-                }
-                return clone;
-            }
-
-            public override void CopyFrom(TermState other)
-            {
-                base.CopyFrom(other);
-                var _other = (PulsingTermState) other;
-                PostingsSize = _other.PostingsSize;
-                if (_other.PostingsSize != -1)
-                {
-                    if (Postings == null || Postings.Length < _other.PostingsSize)
-                    {
-                        Postings = new byte[ArrayUtil.Oversize(_other.PostingsSize, 1)];
-                    }
-                    Array.Copy(_other.Postings, 0, Postings, 0, _other.PostingsSize);
-                }
-                else
-                {
-                    WrappedTermState.CopyFrom(_other.WrappedTermState);
-                }
-            }
-
-            public override String ToString()
-            {
-                if (PostingsSize == -1)
-                    return "PulsingTermState: not inlined: wrapped=" + WrappedTermState;
-                
-                return "PulsingTermState: inlined size=" + PostingsSize + " " + base.ToString();
-            }
-        }
-
-        internal class PulsingDocsEnum : DocsEnum
+        private class PulsingDocsEnum : DocsEnum
         {
             private byte[] _postingsBytes;
             private readonly ByteArrayDataInput _postings = new ByteArrayDataInput();
@@ -387,7 +330,7 @@ namespace Lucene.Net.Codecs.Pulsing
                 _storeOffsets = _indexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
             }
 
-            public PulsingDocsEnum Reset(IBits liveDocs, PulsingTermState termState)
+            public virtual PulsingDocsEnum Reset(IBits liveDocs, PulsingTermState termState)
             {
                 Debug.Assert(termState.PostingsSize != -1);
 
@@ -412,23 +355,18 @@ namespace Lucene.Net.Codecs.Pulsing
                 return this;
             }
 
-            public bool CanReuse(FieldInfo fieldInfo)
+            internal bool CanReuse(FieldInfo fieldInfo)
             {
                 return _indexOptions == fieldInfo.IndexOptions && _storePayloads == fieldInfo.HasPayloads;
             }
 
-            public override int DocID
-            {
-                get { return _docId; }
-            }
-
             public override int NextDoc()
             {
                 while (true)
                 {
                     if (_postings.Eof)
                         return _docId = NO_MORE_DOCS;
-                    
+
                     var code = _postings.ReadVInt();
                     if (_indexOptions == IndexOptions.DOCS_ONLY)
                     {
@@ -483,6 +421,16 @@ namespace Lucene.Net.Codecs.Pulsing
                 }
             }
 
+            public override int Freq
+            {
+                get { return _freq; }
+            }
+
+            public override int DocID
+            {
+                get { return _docId; }
+            }
+
             public override int Advance(int target)
             {
                 return _docId = SlowAdvance(target);
@@ -492,14 +440,9 @@ namespace Lucene.Net.Codecs.Pulsing
             {
                 return _cost;
             }
-
-            public override int Freq
-            {
-                get { return _freq; }
-            }
         }
 
-        internal class PulsingDocsAndPositionsEnum : DocsAndPositionsEnum
+        private class PulsingDocsAndPositionsEnum : DocsAndPositionsEnum
         {
             private byte[] _postingsBytes;
             private readonly ByteArrayDataInput _postings = new ByteArrayDataInput();
@@ -531,7 +474,12 @@ namespace Lucene.Net.Codecs.Pulsing
                     _indexOptions.Value.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) >= 0;
             }
 
-            public PulsingDocsAndPositionsEnum Reset(IBits liveDocs, PulsingTermState termState)
+            internal bool CanReuse(FieldInfo fieldInfo)
+            {
+                return _indexOptions == fieldInfo.IndexOptions && _storePayloads == fieldInfo.HasPayloads;
+            }
+
+            public virtual PulsingDocsAndPositionsEnum Reset(IBits liveDocs, PulsingTermState termState)
             {
                 Debug.Assert(termState.PostingsSize != -1);
 
@@ -558,11 +506,6 @@ namespace Lucene.Net.Codecs.Pulsing
                 return this;
             }
 
-            public bool CanReuse(FieldInfo fieldInfo)
-            {
-                return _indexOptions == fieldInfo.IndexOptions && _storePayloads == fieldInfo.HasPayloads;
-            }
-
             public override int NextDoc()
             {
                 while (true)
@@ -651,13 +594,26 @@ namespace Lucene.Net.Codecs.Pulsing
                 get { return _startOffset + _offsetLength; }
             }
 
+            private void SkipPositions()
+            {
+                while (_posPending != 0)
+                {
+                    NextPosition();
+                }
+                if (_storePayloads && !_payloadRetrieved)
+                {
+                    _postings.SkipBytes(_payloadLength);
+                    _payloadRetrieved = true;
+                }
+            }
+
             public override BytesRef Payload
             {
                 get
                 {
                     if (_payloadRetrieved)
                         return _payload;
-                    
+
                     if (_storePayloads && _payloadLength > 0)
                     {
                         _payloadRetrieved = true;
@@ -673,37 +629,74 @@ namespace Lucene.Net.Codecs.Pulsing
                         _payload.Length = _payloadLength;
                         return _payload;
                     }
-                    
+
                     return null;
                 }
             }
 
-            private void SkipPositions()
-            {
-                while (_posPending != 0)
-                {
-                    NextPosition();
-                }
-                if (_storePayloads && !_payloadRetrieved)
-                {
-                    _postings.SkipBytes(_payloadLength);
-                    _payloadRetrieved = true;
-                }
-            }
-            
             public override long GetCost()
             {
                 return _cost;
             }
         }
-        
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                _wrappedPostingsReader.Dispose();
+            }
+        }
+
+        /// <summary>
+        /// for a docsenum, gets the 'other' reused enum.
+        /// Example: Pulsing(Standard).
+        /// when doing a term range query you are switching back and forth
+        /// between Pulsing and Standard
+        ///  
+        /// The way the reuse works is that Pulsing.other = Standard and
+        /// Standard.other = Pulsing.
+        /// </summary>
+        private DocsEnum GetOther(DocsEnum de)
+        {
+            if (de == null)
+                return null;
+
+            var atts = de.Attributes;
+            DocsEnum result;
+            atts.AddAttribute<IPulsingEnumAttribute>().Enums().TryGetValue(this, out result);
+            return result;
+        }
+
+        /// <summary>
+        /// for a docsenum, sets the 'other' reused enum.
+        /// see GetOther for an example.
+        /// </summary>
+        private DocsEnum SetOther(DocsEnum de, DocsEnum other)
+        {
+            var atts = de.Attributes;
+            return atts.AddAttribute<IPulsingEnumAttribute>().Enums()[this] = other;
+        }
+
+        ///<summary>
+        /// A per-docsenum attribute that stores additional reuse information
+        /// so that pulsing enums can keep a reference to their wrapped enums,
+        /// and vice versa. this way we can always reuse.
+        /// 
+        /// @lucene.internal 
+        /// </summary>
+        public interface IPulsingEnumAttribute : IAttribute
+        {
+            Dictionary<PulsingPostingsReader, DocsEnum> Enums(); // LUCENENET TODO: Make property, change to IDictionary
+        }
+
         /// <summary>
         /// Implementation of {@link PulsingEnumAttribute} for reuse of
         /// wrapped postings readers underneath pulsing.
         /// 
         /// @lucene.internal
         /// </summary>
-        internal sealed class PulsingEnumAttribute : Util.Attribute, IPulsingEnumAttribute
+        public sealed class PulsingEnumAttribute : Util.Attribute, IPulsingEnumAttribute
         {
             // we could store 'other', but what if someone 'chained' multiple postings readers,
             // this could cause problems?
@@ -730,5 +723,15 @@ namespace Lucene.Net.Codecs.Pulsing
                 // we don't want to copy any stuff over to another docsenum ever!
             }
         }
+
+        public override long RamBytesUsed()
+        {
+            return ((_wrappedPostingsReader != null) ? _wrappedPostingsReader.RamBytesUsed() : 0);
+        }
+
+        public override void CheckIntegrity()
+        {
+            _wrappedPostingsReader.CheckIntegrity();
+        }  
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
index 298eebd..f93b2b0 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
@@ -42,9 +42,8 @@ namespace Lucene.Net.Codecs.Pulsing
     /// </summary>
     public sealed class PulsingPostingsWriter : PostingsWriterBase
     {
-
-        internal static readonly String CODEC = "PulsedPostingsWriter";
-        internal static readonly String SUMMARY_EXTENSION = "smy";         // recording field summary
+        internal static readonly string CODEC = "PulsedPostingsWriter";
+        internal static readonly string SUMMARY_EXTENSION = "smy";         // recording field summary
         
         // To add a new version, increment from the last one, and
         // change VERSION_CURRENT to point to your new version:
@@ -65,10 +64,10 @@ namespace Lucene.Net.Codecs.Pulsing
 
         private class PulsingTermState : BlockTermState
         {
-            internal byte[] BYTES;
-            internal BlockTermState WRAPPED_STATE;
+            internal byte[] BYTES; // LUCENENET TODO: Rename bytes
+            internal BlockTermState WRAPPED_STATE; // LUCENENET TODO: Rename wrappedState
 
-            public override String ToString()
+            public override string ToString()
             {
                 if (BYTES != null)
                 {
@@ -95,8 +94,8 @@ namespace Lucene.Net.Codecs.Pulsing
 
         private class FieldMetaData
         {
-            public int FieldNumber { get; private set; }
-            public int LongsSize { get; private set; }
+            internal int FieldNumber { get; private set; }
+            internal int LongsSize { get; private set; }
 
             public FieldMetaData(int number, int size)
             {
@@ -118,7 +117,6 @@ namespace Lucene.Net.Codecs.Pulsing
         /// </summary>
         public PulsingPostingsWriter(SegmentWriteState state, int maxPositions, PostingsWriterBase wrappedPostingsWriter)
         {
-
             _pending = new Position[maxPositions];
             for (var i = 0; i < maxPositions; i++)
             {
@@ -170,6 +168,8 @@ namespace Lucene.Net.Codecs.Pulsing
             return 0;
         }
 
+        private bool DEBUG;
+
         public override void StartDoc(int docId, int termDocFreq)
         {
             Debug.Assert(docId >= 0, "Got DocID=" + docId);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/RectangularArrays.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/RectangularArrays.cs b/src/Lucene.Net.Codecs/RectangularArrays.cs
index 9b41c8a..476fc1b 100644
--- a/src/Lucene.Net.Codecs/RectangularArrays.cs
+++ b/src/Lucene.Net.Codecs/RectangularArrays.cs
@@ -5,7 +5,7 @@
 //	This class provides the logic to simulate Java rectangular arrays, which are jagged
 //	arrays with inner arrays of the same length. A size of -1 indicates unknown length.
 //----------------------------------------------------------------------------------------
-internal static partial class RectangularArrays
+internal static partial class RectangularArrays // LUCENENET TODO: Move to Support ?
 {
     internal static long[][] ReturnRectangularLongArray(int Size1, int Size2)
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
index d08b7d4..6c46a3c 100644
--- a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
@@ -29,15 +29,15 @@ namespace Lucene.Net.Codecs.Sep
     /// </summary>
     public abstract class IntIndexInput : IDisposable
     {
-        public abstract IntIndexInputReader Reader();
+        public abstract IntIndexInputReader Reader(); // LUCENENET TODO: Rename GetReader()
         public abstract void Dispose();
-        public abstract IntIndexInputIndex Index();
+        public abstract IntIndexInputIndex Index(); // LUCENENET TODO: Rename GetIndex()
 
       
     }
     
     /// <summary>Reads int values</summary>
-    public abstract class IntIndexInputReader
+    public abstract class IntIndexInputReader // LUCENENET TODO: Rename AbstractReader and nest within IntIndexInput
     {
         /// <summary>Reads next single int</summary>
         public abstract int Next();
@@ -45,7 +45,7 @@ namespace Lucene.Net.Codecs.Sep
 
     /// <summary>
     /// Records a single skip-point in the <seealso cref="IntIndexInput.Reader"/>. </summary>
-    public abstract class IntIndexInputIndex
+    public abstract class IntIndexInputIndex // LUCENENET TODO: Rename AbstractIndex and nest within IntIndexInput
     {
         public abstract void Read(DataInput indexIn, bool absolute);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs b/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
index e7c51e9..aca46c2 100644
--- a/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs
@@ -34,9 +34,6 @@ namespace Lucene.Net.Codecs.Sep
     /// </remarks>
     public abstract class IntIndexOutput : IDisposable
     {
-        protected internal IndexOutput OUTPUT;
-        protected internal int _upto;
-
         /// <summary>
         /// Write an int to the primary file.  The value must be
         /// >= 0.  
@@ -47,14 +44,14 @@ namespace Lucene.Net.Codecs.Sep
         /// If you are indexing the primary output file, call
         ///  this and interact with the returned IndexWriter. 
         /// </summary>
-        public abstract IntIndexOutputIndex Index();
+        public abstract IntIndexOutputIndex Index(); // LUCENENET TODO: Rename GetIndex()
 
-        public abstract void Dispose();
+        public abstract void Dispose(); // LUCENENET TODO: Implement disposable pattern
     }
 
 
     /// <summary>Records a single skip-point in the IndexOutput. </summary>
-    public abstract class IntIndexOutputIndex
+    public abstract class IntIndexOutputIndex // LUCENENET TODO: Rename AbstractIndex and nest within IntIndexOutput
     {
 
         /// <summary>Internally records the current location </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs b/src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs
index a718d27..1f84e48 100644
--- a/src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs
@@ -27,7 +27,6 @@ namespace Lucene.Net.Codecs.Sep
     /// </summary>
     public abstract class IntStreamFactory
     {
-
         /// <summary>
         /// Create an <seealso cref="IntIndexInput"/> on the provided fileName. 
         /// </summary>
@@ -38,5 +37,4 @@ namespace Lucene.Net.Codecs.Sep
         /// </summary>
         public abstract IntIndexOutput CreateOutput(Directory dir, string fileName, IOContext context);
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
index 797ce4c..60cbd18 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
@@ -115,6 +115,78 @@ namespace Lucene.Net.Codecs.Sep
             IOUtils.Close(_freqIn, _docIn, _skipIn, _posIn, _payloadIn);
         }
 
+        internal sealed class SepTermState : BlockTermState
+        {
+            // We store only the seek point to the docs file because
+            // the rest of the info (freqIndex, posIndex, etc.) is
+            // stored in the docs file:
+            internal IntIndexInputIndex DOC_INDEX;
+            internal IntIndexInputIndex POS_INDEX;
+            internal IntIndexInputIndex FREQ_INDEX;
+            internal long PAYLOAD_FP;
+            internal long SKIP_FP;
+
+            public override object Clone()
+            {
+                var other = new SepTermState();
+                other.CopyFrom(this);
+                return other;
+            }
+
+            public override void CopyFrom(TermState tsOther)
+            {
+                base.CopyFrom(tsOther);
+
+                var other = (SepTermState)tsOther;
+                if (DOC_INDEX == null)
+                {
+                    DOC_INDEX = other.DOC_INDEX.Clone();
+                }
+                else
+                {
+                    DOC_INDEX.CopyFrom(other.DOC_INDEX);
+                }
+                if (other.FREQ_INDEX != null)
+                {
+                    if (FREQ_INDEX == null)
+                    {
+                        FREQ_INDEX = other.FREQ_INDEX.Clone();
+                    }
+                    else
+                    {
+                        FREQ_INDEX.CopyFrom(other.FREQ_INDEX);
+                    }
+                }
+                else
+                {
+                    FREQ_INDEX = null;
+                }
+                if (other.POS_INDEX != null)
+                {
+                    if (POS_INDEX == null)
+                    {
+                        POS_INDEX = other.POS_INDEX.Clone();
+                    }
+                    else
+                    {
+                        POS_INDEX.CopyFrom(other.POS_INDEX);
+                    }
+                }
+                else
+                {
+                    POS_INDEX = null;
+                }
+                PAYLOAD_FP = other.PAYLOAD_FP;
+                SKIP_FP = other.SKIP_FP;
+            }
+
+            public override string ToString()
+            {
+                return base.ToString() + " docIndex=" + DOC_INDEX + " freqIndex=" + FREQ_INDEX + " posIndex=" + POS_INDEX +
+                       " payloadFP=" + PAYLOAD_FP + " skipFP=" + SKIP_FP;
+            }
+        }
+
         public override BlockTermState NewTermState()
         {
             var state = new SepTermState {DOC_INDEX = _docIn.Index()};
@@ -222,89 +294,6 @@ namespace Lucene.Net.Codecs.Sep
             return postingsEnum.Init(fieldInfo, termState, liveDocs);
         }
 
-        public override long RamBytesUsed()
-        {
-            return 0;
-        }
-
-        public override void CheckIntegrity()
-        {
-            // TODO: remove sep layout, its fallen behind on features...
-        }
-
-        internal sealed class SepTermState : BlockTermState
-        {
-            // We store only the seek point to the docs file because
-            // the rest of the info (freqIndex, posIndex, etc.) is
-            // stored in the docs file:
-            internal IntIndexInputIndex DOC_INDEX;
-            internal IntIndexInputIndex POS_INDEX;
-            internal IntIndexInputIndex FREQ_INDEX;
-            internal long PAYLOAD_FP;
-            internal long SKIP_FP;
-
-            public override object Clone()
-            {
-                var other = new SepTermState();
-                other.CopyFrom(this);
-                return other;
-            }
-
-            public override void CopyFrom(TermState tsOther)
-            {
-                base.CopyFrom(tsOther);
-
-                var other = (SepTermState)tsOther;
-                if (DOC_INDEX == null)
-                {
-                    DOC_INDEX = other.DOC_INDEX.Clone();
-                }
-                else
-                {
-                    DOC_INDEX.CopyFrom(other.DOC_INDEX);
-                }
-                if (other.FREQ_INDEX != null)
-                {
-                    if (FREQ_INDEX == null)
-                    {
-                        FREQ_INDEX = other.FREQ_INDEX.Clone();
-                    }
-                    else
-                    {
-                        FREQ_INDEX.CopyFrom(other.FREQ_INDEX);
-                    }
-                }
-                else
-                {
-                    FREQ_INDEX = null;
-                }
-                if (other.POS_INDEX != null)
-                {
-                    if (POS_INDEX == null)
-                    {
-                        POS_INDEX = other.POS_INDEX.Clone();
-                    }
-                    else
-                    {
-                        POS_INDEX.CopyFrom(other.POS_INDEX);
-                    }
-                }
-                else
-                {
-                    POS_INDEX = null;
-                }
-                PAYLOAD_FP = other.PAYLOAD_FP;
-                SKIP_FP = other.SKIP_FP;
-            }
-
-            public override string ToString()
-            {
-                return base.ToString() + " docIndex=" + DOC_INDEX + " freqIndex=" + FREQ_INDEX + " posIndex=" + POS_INDEX +
-                       " payloadFP=" + PAYLOAD_FP + " skipFP=" + SKIP_FP;
-            }
-        }
-
-
         internal class SepDocsEnum : DocsEnum
         {
             private readonly SepPostingsReader _outerInstance;
@@ -327,14 +316,13 @@ namespace Lucene.Net.Codecs.Sep
             private readonly IntIndexInputIndex _docIndex;
             private readonly IntIndexInputIndex _freqIndex;
             private readonly IntIndexInputIndex _posIndex;
+            internal IntIndexInput START_DOC_IN; // LUCENENET TODO: Rename startDocIn
 
             // TODO: -- should we do hasProx with 2 different enum classes?
 
             private bool _skipped;
             private SepSkipListReader _skipper;
 
-            internal IntIndexInput START_DOC_IN;
-
             internal SepDocsEnum(SepPostingsReader outerInstance)
             {
                 _outerInstance = outerInstance;
@@ -389,7 +377,6 @@ namespace Lucene.Net.Codecs.Sep
 
             public override int NextDoc()
             {
-
                 while (true)
                 {
                     if (_count == _docFreq)
@@ -429,17 +416,15 @@ namespace Lucene.Net.Codecs.Sep
 
             public override int Advance(int target)
             {
-
                 if ((target - _outerInstance._skipInterval) >= _doc && _docFreq >= _outerInstance._skipMinimum)
                 {
-
                     // There are enough docs in the posting to have
                     // skip data, and its not too close
 
                     if (_skipper == null)
                     {
                         // This DocsEnum has never done any skipping
-                        _skipper = new SepSkipListReader((IndexInput) _outerInstance._skipIn.Clone(),
+                        _skipper = new SepSkipListReader((IndexInput)_outerInstance._skipIn.Clone(),
                             _outerInstance._freqIn,
                             _outerInstance._docIn, _outerInstance._posIn, _outerInstance._maxSkipLevels,
                             _outerInstance._skipInterval);
@@ -492,7 +477,6 @@ namespace Lucene.Net.Codecs.Sep
         internal class SepDocsAndPositionsEnum : DocsAndPositionsEnum
         {
             private readonly SepPostingsReader _outerInstance;
-            private BytesRef _payload;
 
             private int _docFreq;
             private int _doc = -1;
@@ -511,6 +495,7 @@ namespace Lucene.Net.Codecs.Sep
             private readonly IntIndexInputIndex _docIndex;
             private readonly IntIndexInputIndex _freqIndex;
             private readonly IntIndexInputIndex _posIndex;
+            internal IntIndexInput START_DOC_IN; // LUCENENET TODO: Rename startDocIn
 
             private long _payloadFp;
 
@@ -524,8 +509,6 @@ namespace Lucene.Net.Codecs.Sep
             private bool _payloadPending;
             private bool _posSeekPending;
 
-            internal IntIndexInput START_DOC_IN;
-
             internal SepDocsAndPositionsEnum(SepPostingsReader outerInstance)
             {
                 _outerInstance = outerInstance;
@@ -730,6 +713,8 @@ namespace Lucene.Net.Codecs.Sep
                 get { return -1; }
             }
 
+            private BytesRef _payload;
+
             public override BytesRef Payload
             {
                 get
@@ -772,5 +757,15 @@ namespace Lucene.Net.Codecs.Sep
                 return _docFreq;
             }
         }
+
+        public override long RamBytesUsed()
+        {
+            return 0;
+        }
+
+        public override void CheckIntegrity()
+        {
+            // TODO: remove sep layout, its fallen behind on features...
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
index b34c584..17f3eed 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs
@@ -42,20 +42,20 @@ namespace Lucene.Net.Codecs.Sep
         internal const int VERSION_START = 0;
         internal const int VERSION_CURRENT = VERSION_START;
 
-        internal IntIndexOutput FREQ_OUT;
-        internal IntIndexOutputIndex FREQ_INDEX;
+        internal IntIndexOutput FREQ_OUT; // LUCENENET TODO: Rename freqOut
+        internal IntIndexOutputIndex FREQ_INDEX; // LUCENENET TODO: Rename camelCase
 
-        internal IntIndexOutput POS_OUT;
-        internal IntIndexOutputIndex POS_INDEX;
+        internal IntIndexOutput POS_OUT; // LUCENENET TODO: Rename  camelCase
+        internal IntIndexOutputIndex POS_INDEX; // LUCENENET TODO: Rename  camelCase
 
-        internal IntIndexOutput DOC_OUT;
-        internal IntIndexOutputIndex DOC_INDEX;
+        internal IntIndexOutput DOC_OUT; // LUCENENET TODO: Rename  camelCase
+        internal IntIndexOutputIndex DOC_INDEX; // LUCENENET TODO: Rename  camelCase
 
-        internal IndexOutput PAYLOAD_OUT;
+        internal IndexOutput PAYLOAD_OUT; // LUCENENET TODO: Rename  camelCase
 
-        internal IndexOutput SKIP_OUT;
+        internal IndexOutput SKIP_OUT; // LUCENENET TODO: Rename  camelCase
 
-        internal readonly SepSkipListWriter SKIP_LIST_WRITER;
+        internal readonly SepSkipListWriter SKIP_LIST_WRITER; // LUCENENET TODO: Rename  camelCase
 
         /// <summary>
         /// Expert: The fraction of TermDocs entries stored in skip tables,
@@ -64,37 +64,37 @@ namespace Lucene.Net.Codecs.Sep
         /// smaller values result in bigger indexes, less acceleration and more
         /// accelerable cases. More detailed experiments would be useful here. 
         /// </summary>
-        internal readonly int SKIP_INTERVAL;
+        internal readonly int SKIP_INTERVAL; // LUCENENET TODO: Rename  camelCase
 
         internal const int DEFAULT_SKIP_INTERVAL = 16;
 
         /// <summary>
         /// Expert: minimum docFreq to write any skip data at all
         /// </summary>
-        internal readonly int SKIP_MINIMUM;
+        internal readonly int SKIP_MINIMUM; // LUCENENET TODO: Rename  camelCase
 
         /// <summary>
         /// Expert: The maximum number of skip levels. Smaller values result in 
         /// slightly smaller indexes, but slower skipping in big posting lists.
         /// </summary>
-        internal readonly int MAX_SKIP_LEVELS = 10;
+        internal readonly int MAX_SKIP_LEVELS = 10; // LUCENENET TODO: Rename  camelCase
 
-        internal readonly int TOTAL_NUM_DOCS;
+        internal readonly int TOTAL_NUM_DOCS; // LUCENENET TODO: Rename  camelCase
 
-        internal bool STORE_PAYLOADS;
-        internal IndexOptions INDEX_OPTIONS;
+        internal bool STORE_PAYLOADS; // LUCENENET TODO: Rename  camelCase
+        internal IndexOptions INDEX_OPTIONS; // LUCENENET TODO: Rename  camelCase
 
-        internal FieldInfo FIELD_INFO;
+        internal FieldInfo FIELD_INFO; // LUCENENET TODO: Rename 
 
-        internal int LAST_PAYLOAD_LENGTH;
-        internal int LAST_POSITION;
-        internal long PAYLOAD_START;
-        internal int LAST_DOC_ID;
-        internal int DF;
+        internal int LAST_PAYLOAD_LENGTH; // LUCENENET TODO: Rename  camelCase
+        internal int LAST_POSITION; // LUCENENET TODO: Rename  camelCase
+        internal long PAYLOAD_START; // LUCENENET TODO: Rename  camelCase
+        internal int LAST_DOC_ID; // LUCENENET TODO: Rename  camelCase
+        internal int DF; // LUCENENET TODO: Rename  camelCase
 
         private SepTermState _lastState;
-        internal long LAST_PAYLOAD_FP;
-        internal long LAST_SKIP_FP;
+        internal long LAST_PAYLOAD_FP; // LUCENENET TODO: Rename  camelCase
+        internal long LAST_SKIP_FP; // LUCENENET TODO: Rename  camelCase
 
         public SepPostingsWriter(SegmentWriteState state, IntStreamFactory factory)
             : this(state, factory, DEFAULT_SKIP_INTERVAL)
@@ -407,5 +407,4 @@ namespace Lucene.Net.Codecs.Sep
             IOUtils.Close(DOC_OUT, SKIP_OUT, FREQ_OUT, POS_OUT, PAYLOAD_OUT);
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
index 9c5642f..1491df4 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
@@ -88,7 +88,6 @@ namespace Lucene.Net.Codecs.Sep
         internal virtual void Init(long skipPointer, IntIndexInputIndex docBaseIndex, IntIndexInputIndex freqBaseIndex,
             IntIndexInputIndex posBaseIndex, long payloadBasePointer, int df, bool storesPayloads)
         {
-
             base.Init(skipPointer, df);
             _currentFieldStoresPayloads = storesPayloads;
 
@@ -208,5 +207,4 @@ namespace Lucene.Net.Codecs.Sep
             return delta;
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
index 639af28..13f9529 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
@@ -22,202 +22,202 @@ namespace Lucene.Net.Codecs.Sep
     using Store;
     using Support;
 
-	/// <summary>
-	/// Implements the skip list writer for the default posting list format
-	/// that stores positions and payloads.
-	/// 
-	/// @lucene.experimental
-	/// </summary>
-	/// <remarks>
+    /// <summary>
+    /// Implements the skip list writer for the default posting list format
+    /// that stores positions and payloads.
+    /// 
+    /// @lucene.experimental
+    /// </summary>
+    /// <remarks>
     /// TODO: -- skip data should somehow be more local to the particular stream 
     /// (doc, freq, pos, payload)
-	/// </remarks>
-	internal class SepSkipListWriter : MultiLevelSkipListWriter
-	{
-	  private readonly int[] _lastSkipDoc;
-	  private readonly int[] _lastSkipPayloadLength;
-	  private readonly long[] _lastSkipPayloadPointer;
-      private IndexOptions _indexOptions;
-
-      private readonly IntIndexOutputIndex[] _docIndex;
-      private readonly IntIndexOutputIndex[] _freqIndex;
-      private readonly IntIndexOutputIndex[] _posIndex;
-
-	  private readonly IntIndexOutput _freqOutput;
-	  private IntIndexOutput _posOutput;
-      private IndexOutput _payloadOutput;
-
-	  private int _curDoc;
-	  private bool _curStorePayloads;
-	  private int _curPayloadLength;
-	  private long _curPayloadPointer;
-
-	    internal SepSkipListWriter(int skipInterval, int numberOfSkipLevels, int docCount, IntIndexOutput freqOutput,
-	        IntIndexOutput docOutput, IntIndexOutput posOutput, IndexOutput payloadOutput)
-	        : base(skipInterval, numberOfSkipLevels, docCount)
-	    {
-
-	        _freqOutput = freqOutput;
-	        _posOutput = posOutput;
-	        _payloadOutput = payloadOutput;
-
-	        _lastSkipDoc = new int[numberOfSkipLevels];
-	        _lastSkipPayloadLength = new int[numberOfSkipLevels];
-	        // TODO: -- also cutover normal IndexOutput to use getIndex()?
-	        _lastSkipPayloadPointer = new long[numberOfSkipLevels];
-
-	        _freqIndex = new IntIndexOutputIndex[numberOfSkipLevels];
-	        _docIndex = new IntIndexOutputIndex[numberOfSkipLevels];
-	        _posIndex = new IntIndexOutputIndex[numberOfSkipLevels];
-
-	        for (var i = 0; i < numberOfSkipLevels; i++)
-	        {
-	            if (freqOutput != null)
-	            {
-	                _freqIndex[i] = freqOutput.Index();
-	            }
-	            _docIndex[i] = docOutput.Index();
-	            if (posOutput != null)
-	            {
-	                _posIndex[i] = posOutput.Index();
-	            }
-	        }
-	    }
-
-	    internal virtual IndexOptions IndexOptions
-	    {
-	        set { _indexOptions = value; }
-	    }
-
-	    internal virtual IntIndexOutput PosOutput
-	    {
-	        set
-	        {
-	            _posOutput = value;
+    /// </remarks>
+    internal class SepSkipListWriter : MultiLevelSkipListWriter
+    {
+        private readonly int[] _lastSkipDoc;
+        private readonly int[] _lastSkipPayloadLength;
+        private readonly long[] _lastSkipPayloadPointer;
+
+        private readonly IntIndexOutputIndex[] _docIndex;
+        private readonly IntIndexOutputIndex[] _freqIndex;
+        private readonly IntIndexOutputIndex[] _posIndex;
+
+        private readonly IntIndexOutput _freqOutput;
+        private IntIndexOutput _posOutput;
+        private IndexOutput _payloadOutput;
+
+        private int _curDoc;
+        private bool _curStorePayloads;
+        private int _curPayloadLength;
+        private long _curPayloadPointer;
+
+        internal SepSkipListWriter(int skipInterval, int numberOfSkipLevels, int docCount, IntIndexOutput freqOutput,
+            IntIndexOutput docOutput, IntIndexOutput posOutput, IndexOutput payloadOutput)
+            : base(skipInterval, numberOfSkipLevels, docCount)
+        {
+
+            _freqOutput = freqOutput;
+            _posOutput = posOutput;
+            _payloadOutput = payloadOutput;
+
+            _lastSkipDoc = new int[numberOfSkipLevels];
+            _lastSkipPayloadLength = new int[numberOfSkipLevels];
+            // TODO: -- also cutover normal IndexOutput to use getIndex()?
+            _lastSkipPayloadPointer = new long[numberOfSkipLevels];
+
+            _freqIndex = new IntIndexOutputIndex[numberOfSkipLevels];
+            _docIndex = new IntIndexOutputIndex[numberOfSkipLevels];
+            _posIndex = new IntIndexOutputIndex[numberOfSkipLevels];
+
+            for (var i = 0; i < numberOfSkipLevels; i++)
+            {
+                if (freqOutput != null)
+                {
+                    _freqIndex[i] = freqOutput.Index();
+                }
+                _docIndex[i] = docOutput.Index();
+                if (posOutput != null)
+                {
+                    _posIndex[i] = posOutput.Index();
+                }
+            }
+        }
+
+        private IndexOptions _indexOptions;
+
+        internal virtual IndexOptions IndexOptions // LUCENENET TODO: Make SetIndexOptions(IndexOptions v)
+        {
+            set { _indexOptions = value; }
+        }
+
+        internal virtual IntIndexOutput PosOutput // LUCENENET TODO: Make SetPosOutput(IntIndexOutput posOutput)
+        {
+            set
+            {
+                _posOutput = value;
                 for (var i = 0; i < m_numberOfSkipLevels; i++)
-	            {
-	                _posIndex[i] = value.Index();
-	            }
-	        }
-	    }
-
-	    internal virtual IndexOutput PayloadOutput
-	    {
-	        set { _payloadOutput = value; }
-	    }
-
-	    /// <summary>
-	    /// Sets the values for the current skip data. 
+                {
+                    _posIndex[i] = value.Index();
+                }
+            }
+        }
+
+        internal virtual IndexOutput PayloadOutput // LUCENENET TODO: Make SetPayloadOutput(IndexOutput payloadOutput)
+        {
+            set { _payloadOutput = value; }
+        }
+
+        /// <summary>
+        /// Sets the values for the current skip data. 
         /// Called @ every index interval (every 128th (by default) doc)
-	    /// </summary>
-	    internal virtual void SetSkipData(int doc, bool storePayloads, int payloadLength)
-	    {
-	        _curDoc = doc;
-	        _curStorePayloads = storePayloads;
-	        _curPayloadLength = payloadLength;
-	        if (_payloadOutput != null)
-	        {
-	            _curPayloadPointer = _payloadOutput.FilePointer;
-	        }
-	    }
-        
-	    /// <summary>
-	    /// Called @ start of new term
-	    /// </summary>
+        /// </summary>
+        internal virtual void SetSkipData(int doc, bool storePayloads, int payloadLength)
+        {
+            _curDoc = doc;
+            _curStorePayloads = storePayloads;
+            _curPayloadLength = payloadLength;
+            if (_payloadOutput != null)
+            {
+                _curPayloadPointer = _payloadOutput.FilePointer;
+            }
+        }
+
+        /// <summary>
+        /// Called @ start of new term
+        /// </summary>
         protected internal virtual void ResetSkip(IntIndexOutputIndex topDocIndex, IntIndexOutputIndex topFreqIndex,
-	        IntIndexOutputIndex topPosIndex)
-	    {
-	        base.ResetSkip();
-
-	        Arrays.Fill(_lastSkipDoc, 0);
-	        Arrays.Fill(_lastSkipPayloadLength, -1); // we don't have to write the first length in the skip list
-	        for (int i = 0; i < m_numberOfSkipLevels; i++)
-	        {
-	            _docIndex[i].CopyFrom(topDocIndex, true);
-	            if (_freqOutput != null)
-	            {
-	                _freqIndex[i].CopyFrom(topFreqIndex, true);
-	            }
-	            if (_posOutput != null)
-	            {
-	                _posIndex[i].CopyFrom(topPosIndex, true);
-	            }
-	        }
-	        if (_payloadOutput != null)
-	        {
-	            Arrays.Fill(_lastSkipPayloadPointer, _payloadOutput.FilePointer);
-	        }
-	    }
-
-	    protected override void WriteSkipData(int level, IndexOutput skipBuffer)
-	    {
-	        // To efficiently store payloads in the posting lists we do not store the length of
-	        // every payload. Instead we omit the length for a payload if the previous payload had
-	        // the same length.
-	        // However, in order to support skipping the payload length at every skip point must be known.
-	        // So we use the same length encoding that we use for the posting lists for the skip data as well:
-	        // Case 1: current field does not store payloads
-	        //           SkipDatum                 --> DocSkip, FreqSkip, ProxSkip
-	        //           DocSkip,FreqSkip,ProxSkip --> VInt
-	        //           DocSkip records the document number before every SkipInterval th  document in TermFreqs. 
-	        //           Document numbers are represented as differences from the previous value in the sequence.
-	        // Case 2: current field stores payloads
-	        //           SkipDatum                 --> DocSkip, PayloadLength?, FreqSkip,ProxSkip
-	        //           DocSkip,FreqSkip,ProxSkip --> VInt
-	        //           PayloadLength             --> VInt    
-	        //         In this case DocSkip/2 is the difference between
-	        //         the current and the previous value. If DocSkip
-	        //         is odd, then a PayloadLength encoded as VInt follows,
-	        //         if DocSkip is even, then it is assumed that the
-	        //         current payload length equals the length at the previous
-	        //         skip point
+            IntIndexOutputIndex topPosIndex)
+        {
+            base.ResetSkip();
+
+            Arrays.Fill(_lastSkipDoc, 0);
+            Arrays.Fill(_lastSkipPayloadLength, -1); // we don't have to write the first length in the skip list
+            for (int i = 0; i < m_numberOfSkipLevels; i++)
+            {
+                _docIndex[i].CopyFrom(topDocIndex, true);
+                if (_freqOutput != null)
+                {
+                    _freqIndex[i].CopyFrom(topFreqIndex, true);
+                }
+                if (_posOutput != null)
+                {
+                    _posIndex[i].CopyFrom(topPosIndex, true);
+                }
+            }
+            if (_payloadOutput != null)
+            {
+                Arrays.Fill(_lastSkipPayloadPointer, _payloadOutput.FilePointer);
+            }
+        }
+
+        protected override void WriteSkipData(int level, IndexOutput skipBuffer)
+        {
+            // To efficiently store payloads in the posting lists we do not store the length of
+            // every payload. Instead we omit the length for a payload if the previous payload had
+            // the same length.
+            // However, in order to support skipping the payload length at every skip point must be known.
+            // So we use the same length encoding that we use for the posting lists for the skip data as well:
+            // Case 1: current field does not store payloads
+            //           SkipDatum                 --> DocSkip, FreqSkip, ProxSkip
+            //           DocSkip,FreqSkip,ProxSkip --> VInt
+            //           DocSkip records the document number before every SkipInterval th  document in TermFreqs. 
+            //           Document numbers are represented as differences from the previous value in the sequence.
+            // Case 2: current field stores payloads
+            //           SkipDatum                 --> DocSkip, PayloadLength?, FreqSkip,ProxSkip
+            //           DocSkip,FreqSkip,ProxSkip --> VInt
+            //           PayloadLength             --> VInt    
+            //         In this case DocSkip/2 is the difference between
+            //         the current and the previous value. If DocSkip
+            //         is odd, then a PayloadLength encoded as VInt follows,
+            //         if DocSkip is even, then it is assumed that the
+            //         current payload length equals the length at the previous
+            //         skip point
 
             Debug.Assert(_indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS || !_curStorePayloads);
 
-	        if (_curStorePayloads)
-	        {
-	            int delta = _curDoc - _lastSkipDoc[level];
-	            if (_curPayloadLength == _lastSkipPayloadLength[level])
-	            {
-	                // the current payload length equals the length at the previous skip point,
-	                // so we don't store the length again
-	                skipBuffer.WriteVInt(delta << 1);
-	            }
-	            else
-	            {
-	                // the payload length is different from the previous one. We shift the DocSkip, 
-	                // set the lowest bit and store the current payload length as VInt.
-	                skipBuffer.WriteVInt(delta << 1 | 1);
-	                skipBuffer.WriteVInt(_curPayloadLength);
-	                _lastSkipPayloadLength[level] = _curPayloadLength;
-	            }
-	        }
-	        else
-	        {
-	            // current field does not store payloads
-	            skipBuffer.WriteVInt(_curDoc - _lastSkipDoc[level]);
-	        }
+            if (_curStorePayloads)
+            {
+                int delta = _curDoc - _lastSkipDoc[level];
+                if (_curPayloadLength == _lastSkipPayloadLength[level])
+                {
+                    // the current payload length equals the length at the previous skip point,
+                    // so we don't store the length again
+                    skipBuffer.WriteVInt(delta << 1);
+                }
+                else
+                {
+                    // the payload length is different from the previous one. We shift the DocSkip, 
+                    // set the lowest bit and store the current payload length as VInt.
+                    skipBuffer.WriteVInt(delta << 1 | 1);
+                    skipBuffer.WriteVInt(_curPayloadLength);
+                    _lastSkipPayloadLength[level] = _curPayloadLength;
+                }
+            }
+            else
+            {
+                // current field does not store payloads
+                skipBuffer.WriteVInt(_curDoc - _lastSkipDoc[level]);
+            }
 
             if (_indexOptions != IndexOptions.DOCS_ONLY)
-	        {
-	            _freqIndex[level].Mark();
-	            _freqIndex[level].Write(skipBuffer, false);
-	        }
-	        _docIndex[level].Mark();
-	        _docIndex[level].Write(skipBuffer, false);
-	        if (_indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
-	        {
-	            _posIndex[level].Mark();
-	            _posIndex[level].Write(skipBuffer, false);
-	            if (_curStorePayloads)
-	            {
-	                skipBuffer.WriteVInt((int) (_curPayloadPointer - _lastSkipPayloadPointer[level]));
-	            }
-	        }
-
-	        _lastSkipDoc[level] = _curDoc;
-	        _lastSkipPayloadPointer[level] = _curPayloadPointer;
-	    }
-	}
-
+            {
+                _freqIndex[level].Mark();
+                _freqIndex[level].Write(skipBuffer, false);
+            }
+            _docIndex[level].Mark();
+            _docIndex[level].Write(skipBuffer, false);
+            if (_indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
+            {
+                _posIndex[level].Mark();
+                _posIndex[level].Write(skipBuffer, false);
+                if (_curStorePayloads)
+                {
+                    skipBuffer.WriteVInt((int)(_curPayloadPointer - _lastSkipPayloadPointer[level]));
+                }
+            }
+
+            _lastSkipDoc[level] = _curDoc;
+            _lastSkipPayloadPointer[level] = _curPayloadPointer;
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextCodec.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextCodec.cs
index 4426e9c..d86b2d5 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextCodec.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextCodec.cs
@@ -36,7 +36,8 @@ namespace Lucene.Net.Codecs.SimpleText
         private readonly LiveDocsFormat _liveDocs = new SimpleTextLiveDocsFormat();
         private readonly DocValuesFormat _dvFormat = new SimpleTextDocValuesFormat();
 
-        public SimpleTextCodec() : base("SimpleText")
+        public SimpleTextCodec() 
+            : base("SimpleText")
         {
         }
 
@@ -80,5 +81,4 @@ namespace Lucene.Net.Codecs.SimpleText
             get { return _dvFormat; }
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesFormat.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesFormat.cs
index fdbda1d..b99dc1c 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesFormat.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesFormat.cs
@@ -119,8 +119,8 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextDocValuesFormat : DocValuesFormat
     {
-
-        public SimpleTextDocValuesFormat() : base("SimpleText")
+        public SimpleTextDocValuesFormat() 
+            : base("SimpleText")
         {
         }
 
@@ -128,11 +128,10 @@ namespace Lucene.Net.Codecs.SimpleText
         {
             return new SimpleTextDocValuesWriter(state, "dat");
         }
+
         public override DocValuesProducer FieldsProducer(SegmentReadState state)
         {
             return new SimpleTextDocValuesReader(state, "dat");
         }
-
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
index fe20ff8..cdea8dc 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
@@ -43,7 +43,7 @@ namespace Lucene.Net.Codecs.SimpleText
     using StringHelper = Util.StringHelper;
     using System.Numerics;
 
-    public class SimpleTextDocValuesReader : DocValuesProducer
+    public class SimpleTextDocValuesReader : DocValuesProducer // LUCENENET NOTE: Changed from internal to public because it is subclassed by a public class
     {
         internal class OneField
         {
@@ -56,12 +56,13 @@ namespace Lucene.Net.Codecs.SimpleText
             public long NumValues { get; set; }
         }
 
-        internal readonly int MAX_DOC;
-        internal readonly IndexInput DATA;
-        internal readonly BytesRef SCRATCH = new BytesRef();
-        internal readonly IDictionary<string, OneField> FIELDS = new Dictionary<string, OneField>();
+        private readonly int MAX_DOC; // LUCENENET TODO: Rename camelCase
+        private readonly IndexInput DATA; // LUCENENET TODO: Rename camelCase
+        private readonly BytesRef SCRATCH = new BytesRef(); // LUCENENET TODO: Rename camelCase
+        private readonly IDictionary<string, OneField> FIELDS = new Dictionary<string, OneField>(); // LUCENENET TODO: Rename camelCase
 
-        public SimpleTextDocValuesReader(SegmentReadState state, string ext)
+        // LUCENENET NOTE: Changed from public to internal because the class had to be made public, but is not for public use.
+        internal SimpleTextDocValuesReader(SegmentReadState state, string ext)
         {
             DATA = state.Directory.OpenInput(
                     IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, ext), state.Context);
@@ -153,66 +154,49 @@ namespace Lucene.Net.Codecs.SimpleText
             return new NumericDocValuesAnonymousInnerClassHelper(this, field, @in, scratch);
         }
 
-        public override BinaryDocValues GetBinary(FieldInfo fieldInfo)
+        private class NumericDocValuesAnonymousInnerClassHelper : NumericDocValues
         {
-            var field = FIELDS[fieldInfo.Name];
-            Debug.Assert(field != null);
-            var input = (IndexInput)DATA.Clone();
-            var scratch = new BytesRef();
-
-            return new BinaryDocValuesAnonymousInnerClassHelper(this, field, input, scratch);
-        }
+            private readonly SimpleTextDocValuesReader _outerInstance;
 
-        public override SortedDocValues GetSorted(FieldInfo fieldInfo)
-        {
-            var field = FIELDS[fieldInfo.Name];
+            private readonly OneField _field;
+            private readonly IndexInput _input;
+            private readonly BytesRef _scratch;
 
-            // SegmentCoreReaders already verifies this field is valid:
-            Debug.Assert(field != null);
-            var input = (IndexInput)DATA.Clone();
-            var scratch = new BytesRef();
+            public NumericDocValuesAnonymousInnerClassHelper(SimpleTextDocValuesReader outerInstance,
+                OneField field, IndexInput input, BytesRef scratch)
+            {
+                _outerInstance = outerInstance;
+                _field = field;
+                _input = input;
+                _scratch = scratch;
+            }
 
-            return new SortedDocValuesAnonymousInnerClassHelper(this, field, input, scratch);
-        }
+            public override long Get(int docId)
+            {
+                if (docId < 0 || docId >= _outerInstance.MAX_DOC)
+                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.MAX_DOC - 1) +
+                                                       "; got " + docId);
 
-        public override SortedSetDocValues GetSortedSet(FieldInfo fieldInfo)
-        {
-            var field = FIELDS[fieldInfo.Name];
+                _input.Seek(_field.DataStartFilePointer + (1 + _field.Pattern.Length + 2) * docId);
+                SimpleTextUtil.ReadLine(_input, _scratch);
 
-            // SegmentCoreReaders already verifies this field is
-            // valid:
-            Debug.Assert(field != null);
 
-            var input = (IndexInput) DATA.Clone();
-            var scratch = new BytesRef();
-            
-            return new SortedSetDocValuesAnonymousInnerClassHelper(this, field, input, scratch);
-        }
+                decimal bd;
+                try
+                {
+                    // LUCNENENET: .NET doesn't have a way to specify a pattern with decimal, but all of the standard ones are built in.
+                    bd = decimal.Parse(_scratch.Utf8ToString(), NumberStyles.Float, CultureInfo.InvariantCulture);
+                }
+                catch (FormatException ex)
+                {
+                    throw new CorruptIndexException("failed to parse long value (resource=" + _input + ")", ex);
+                }
 
-        public override IBits GetDocsWithField(FieldInfo field)
-        {
-            switch (field.DocValuesType)
-            {
-                case DocValuesType.SORTED_SET:
-                    return DocValues.DocsWithValue(GetSortedSet(field), MAX_DOC);
-                case DocValuesType.SORTED:
-                    return DocValues.DocsWithValue(GetSorted(field), MAX_DOC);
-                case DocValuesType.BINARY:
-                    return GetBinaryDocsWithField(field);
-                case DocValuesType.NUMERIC:
-                    return GetNumericDocsWithField(field);
-                default:
-                    throw new ArgumentOutOfRangeException();
+                SimpleTextUtil.ReadLine(_input, _scratch); // read the line telling us if its real or not
+                return (long)BigInteger.Add(new BigInteger(_field.MinValue), new BigInteger(bd));
             }
         }
 
-        protected override void Dispose(bool disposing)
-        {
-            if (!disposing) return;
-
-            DATA.Dispose();
-        }
-
         private IBits GetNumericDocsWithField(FieldInfo fieldInfo)
         {
             var field = FIELDS[fieldInfo.Name];
@@ -221,56 +205,6 @@ namespace Lucene.Net.Codecs.SimpleText
             return new BitsAnonymousInnerClassHelper(this, field, input, scratch);
         }
 
-        private IBits GetBinaryDocsWithField(FieldInfo fieldInfo)
-        {
-            var field = FIELDS[fieldInfo.Name];
-            var input = (IndexInput)DATA.Clone();
-            var scratch = new BytesRef();
-
-            return new BitsAnonymousInnerClassHelper2(this, field, input, scratch);
-        }
-
-        /// <summary> Used only in ctor: </summary>
-        private void ReadLine()
-        {
-            SimpleTextUtil.ReadLine(DATA, SCRATCH);
-        }
-
-        /// <summary> Used only in ctor: </summary>
-        private bool StartsWith(BytesRef prefix)
-        {
-            return StringHelper.StartsWith(SCRATCH, prefix);
-        }
-
-        /// <summary> Used only in ctor: </summary>
-        private string StripPrefix(BytesRef prefix)
-        {
-            return Encoding.UTF8.GetString(SCRATCH.Bytes, SCRATCH.Offset + prefix.Length, SCRATCH.Length - prefix.Length);
-        }
-
-        public override long RamBytesUsed()
-        {
-            return 0;
-        }
-
-        public override void CheckIntegrity()
-        {
-            var iScratch = new BytesRef();
-            var clone = (IndexInput) DATA.Clone();
-            clone.Seek(0);
-            ChecksumIndexInput input = new BufferedChecksumIndexInput(clone);
-            while (true)
-            {
-                SimpleTextUtil.ReadLine(input, iScratch);
-                if (!iScratch.Equals(SimpleTextDocValuesWriter.END)) continue;
-
-                SimpleTextUtil.CheckFooter(input);
-                break;
-            }
-        }
-
-
-
         private class BitsAnonymousInnerClassHelper : IBits
         {
             private readonly SimpleTextDocValuesReader _outerInstance;
@@ -302,6 +236,70 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
+        public override BinaryDocValues GetBinary(FieldInfo fieldInfo)
+        {
+            var field = FIELDS[fieldInfo.Name];
+            Debug.Assert(field != null);
+            var input = (IndexInput)DATA.Clone();
+            var scratch = new BytesRef();
+
+            return new BinaryDocValuesAnonymousInnerClassHelper(this, field, input, scratch);
+        }
+
+        private class BinaryDocValuesAnonymousInnerClassHelper : BinaryDocValues
+        {
+            private readonly SimpleTextDocValuesReader _outerInstance;
+
+            private readonly OneField _field;
+            private readonly IndexInput _input;
+            private readonly BytesRef _scratch;
+
+            public BinaryDocValuesAnonymousInnerClassHelper(SimpleTextDocValuesReader outerInstance, OneField field,
+                IndexInput input, BytesRef scratch)
+            {
+                _outerInstance = outerInstance;
+                _field = field;
+                _input = input;
+                _scratch = scratch;
+            }
+
+            public override void Get(int docId, BytesRef result)
+            {
+                if (docId < 0 || docId >= _outerInstance.MAX_DOC)
+                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.MAX_DOC - 1) +
+                                                       "; got " + docId);
+
+                _input.Seek(_field.DataStartFilePointer + (9 + _field.Pattern.Length + _field.MaxLength + 2) * docId);
+                SimpleTextUtil.ReadLine(_input, _scratch);
+                Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextDocValuesWriter.LENGTH));
+                int len;
+                try
+                {
+                    // LUCNENENET: .NET doesn't have a way to specify a pattern with integer, but all of the standard ones are built in.
+                    len = int.Parse(Encoding.UTF8.GetString(_scratch.Bytes, _scratch.Offset + SimpleTextDocValuesWriter.LENGTH.Length,
+                        _scratch.Length - SimpleTextDocValuesWriter.LENGTH.Length), NumberStyles.Integer, CultureInfo.InvariantCulture);
+                }
+                catch (FormatException ex)
+                {
+                    throw new CorruptIndexException("failed to parse int value (resource=" + _input + ")", ex);
+                }
+
+                result.Bytes = new byte[len];
+                result.Offset = 0;
+                result.Length = len;
+                _input.ReadBytes(result.Bytes, 0, len);
+            }
+        }
+
+        private IBits GetBinaryDocsWithField(FieldInfo fieldInfo)
+        {
+            var field = FIELDS[fieldInfo.Name];
+            var input = (IndexInput)DATA.Clone();
+            var scratch = new BytesRef();
+
+            return new BitsAnonymousInnerClassHelper2(this, field, input, scratch);
+        }
+
         private class BitsAnonymousInnerClassHelper2 : IBits
         {
             private readonly SimpleTextDocValuesReader _outerInstance;
@@ -349,6 +347,18 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
+        public override SortedDocValues GetSorted(FieldInfo fieldInfo)
+        {
+            var field = FIELDS[fieldInfo.Name];
+
+            // SegmentCoreReaders already verifies this field is valid:
+            Debug.Assert(field != null);
+            var input = (IndexInput)DATA.Clone();
+            var scratch = new BytesRef();
+
+            return new SortedDocValuesAnonymousInnerClassHelper(this, field, input, scratch);
+        }
+
         private class SortedDocValuesAnonymousInnerClassHelper : SortedDocValues
         {
             private readonly SimpleTextDocValuesReader _outerInstance;
@@ -430,6 +440,20 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
+        public override SortedSetDocValues GetSortedSet(FieldInfo fieldInfo)
+        {
+            var field = FIELDS[fieldInfo.Name];
+
+            // SegmentCoreReaders already verifies this field is
+            // valid:
+            Debug.Assert(field != null);
+
+            var input = (IndexInput) DATA.Clone();
+            var scratch = new BytesRef();
+            
+            return new SortedSetDocValuesAnonymousInnerClassHelper(this, field, input, scratch);
+        }
+
         private class SortedSetDocValuesAnonymousInnerClassHelper : SortedSetDocValues
         {
             private readonly SimpleTextDocValuesReader _outerInstance;
@@ -510,94 +534,67 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
-        private class NumericDocValuesAnonymousInnerClassHelper : NumericDocValues
+        public override IBits GetDocsWithField(FieldInfo field)
         {
-            private readonly SimpleTextDocValuesReader _outerInstance;
-
-            private readonly OneField _field;
-            private readonly IndexInput _input;
-            private readonly BytesRef _scratch;
-
-            public NumericDocValuesAnonymousInnerClassHelper(SimpleTextDocValuesReader outerInstance,
-                OneField field, IndexInput input, BytesRef scratch)
+            switch (field.DocValuesType)
             {
-                _outerInstance = outerInstance;
-                _field = field;
-                _input = input;
-                _scratch = scratch;
+                case DocValuesType.SORTED_SET:
+                    return DocValues.DocsWithValue(GetSortedSet(field), MAX_DOC);
+                case DocValuesType.SORTED:
+                    return DocValues.DocsWithValue(GetSorted(field), MAX_DOC);
+                case DocValuesType.BINARY:
+                    return GetBinaryDocsWithField(field);
+                case DocValuesType.NUMERIC:
+                    return GetNumericDocsWithField(field);
+                default:
+                    throw new ArgumentOutOfRangeException();
             }
+        }
 
-            public override long Get(int docId)
-            {
-                if (docId < 0 || docId >= _outerInstance.MAX_DOC)
-                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.MAX_DOC - 1) +
-                                                       "; got " + docId);
-
-                _input.Seek(_field.DataStartFilePointer + (1 + _field.Pattern.Length + 2) * docId);
-                SimpleTextUtil.ReadLine(_input, _scratch);
+        protected override void Dispose(bool disposing)
+        {
+            if (!disposing) return;
 
-                
-                decimal bd;
-                try
-                {
-                    // LUCNENENET: .NET doesn't have a way to specify a pattern with decimal, but all of the standard ones are built in.
-                    bd = decimal.Parse(_scratch.Utf8ToString(), NumberStyles.Float, CultureInfo.InvariantCulture);
-                }
-                catch (FormatException ex)
-                {
-                    throw new CorruptIndexException("failed to parse long value (resource=" + _input + ")", ex);
-                }
+            DATA.Dispose();
+        }
 
-                SimpleTextUtil.ReadLine(_input, _scratch); // read the line telling us if its real or not
-                return (long)BigInteger.Add(new BigInteger(_field.MinValue), new BigInteger(bd));
-            }
+        /// <summary> Used only in ctor: </summary>
+        private void ReadLine()
+        {
+            SimpleTextUtil.ReadLine(DATA, SCRATCH);
         }
 
-        private class BinaryDocValuesAnonymousInnerClassHelper : BinaryDocValues
+        /// <summary> Used only in ctor: </summary>
+        private bool StartsWith(BytesRef prefix)
         {
-            private readonly SimpleTextDocValuesReader _outerInstance;
+            return StringHelper.StartsWith(SCRATCH, prefix);
+        }
 
-            private readonly OneField _field;
-            private readonly IndexInput _input;
-            private readonly BytesRef _scratch;
+        /// <summary> Used only in ctor: </summary>
+        private string StripPrefix(BytesRef prefix)
+        {
+            return Encoding.UTF8.GetString(SCRATCH.Bytes, SCRATCH.Offset + prefix.Length, SCRATCH.Length - prefix.Length);
+        }
 
-            public BinaryDocValuesAnonymousInnerClassHelper(SimpleTextDocValuesReader outerInstance, OneField field,
-                IndexInput input, BytesRef scratch)
-            {
-                _outerInstance = outerInstance;
-                _field = field;
-                _input = input;
-                _scratch = scratch;
-            }
+        public override long RamBytesUsed()
+        {
+            return 0;
+        }
 
-            public override void Get(int docId, BytesRef result)
+        public override void CheckIntegrity()
+        {
+            var iScratch = new BytesRef();
+            var clone = (IndexInput) DATA.Clone();
+            clone.Seek(0);
+            ChecksumIndexInput input = new BufferedChecksumIndexInput(clone);
+            while (true)
             {
-                if (docId < 0 || docId >= _outerInstance.MAX_DOC)
-                    throw new IndexOutOfRangeException("docID must be 0 .. " + (_outerInstance.MAX_DOC - 1) +
-                                                       "; got " + docId);
-
-                _input.Seek(_field.DataStartFilePointer + (9 + _field.Pattern.Length + _field.MaxLength + 2) * docId);
-                SimpleTextUtil.ReadLine(_input, _scratch);
-                Debug.Assert(StringHelper.StartsWith(_scratch, SimpleTextDocValuesWriter.LENGTH));
-                int len;
-                try
-                {
-                    // LUCNENENET: .NET doesn't have a way to specify a pattern with integer, but all of the standard ones are built in.
-                    len = int.Parse(Encoding.UTF8.GetString(_scratch.Bytes, _scratch.Offset + SimpleTextDocValuesWriter.LENGTH.Length,
-                        _scratch.Length - SimpleTextDocValuesWriter.LENGTH.Length), NumberStyles.Integer, CultureInfo.InvariantCulture);
-                }
-                catch (FormatException ex)
-                {
-                    throw new CorruptIndexException("failed to parse int value (resource=" + _input + ")", ex);
-                }
+                SimpleTextUtil.ReadLine(input, iScratch);
+                if (!iScratch.Equals(SimpleTextDocValuesWriter.END)) continue;
 
-                result.Bytes = new byte[len];
-                result.Offset = 0;
-                result.Length = len;
-                _input.ReadBytes(result.Bytes, 0, len);
+                SimpleTextUtil.CheckFooter(input);
+                break;
             }
         }
-
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
index eea616d..df88f2d 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesWriter.cs
@@ -33,36 +33,47 @@ namespace Lucene.Net.Codecs.SimpleText
     using BytesRef = Util.BytesRef;
     using IOUtils = Util.IOUtils;
 
-    public class SimpleTextDocValuesWriter : DocValuesConsumer
+    public class SimpleTextDocValuesWriter : DocValuesConsumer // LUCENENET NOTE: changed from internal to public because it is subclassed by a public type
     {
         internal static readonly BytesRef END = new BytesRef("END");
         internal static readonly BytesRef FIELD = new BytesRef("field ");
         internal static readonly BytesRef TYPE = new BytesRef("  type ");
-        
+
         // used for numerics
         internal static readonly BytesRef MINVALUE = new BytesRef("  minvalue ");
         internal static readonly BytesRef PATTERN = new BytesRef("  pattern ");
-        
+
         // used for bytes
         internal static readonly BytesRef LENGTH = new BytesRef("length ");
         internal static readonly BytesRef MAXLENGTH = new BytesRef("  maxlength ");
-        
+
         // used for sorted bytes
         internal static readonly BytesRef NUMVALUES = new BytesRef("  numvalues ");
         internal static readonly BytesRef ORDPATTERN = new BytesRef("  ordpattern ");
 
-        internal IndexOutput data;
-        internal readonly BytesRef scratch = new BytesRef();
-        internal readonly int numDocs;
+        private IndexOutput data;
+        private readonly BytesRef scratch = new BytesRef();
+        private readonly int numDocs;
         private readonly HashSet<string> _fieldsSeen = new HashSet<string>(); // for asserting
 
-        public SimpleTextDocValuesWriter(SegmentWriteState state, string ext)
+        // LUCENENET NOTE: Changed from public to internal because the class had to be made public, but is not for public use.
+        internal SimpleTextDocValuesWriter(SegmentWriteState state, string ext)
         {
             data = state.Directory.CreateOutput(
                     IndexFileNames.SegmentFileName(state.SegmentInfo.Name, state.SegmentSuffix, ext), state.Context);
             numDocs = state.SegmentInfo.DocCount;
         }
 
+        /// <summary>
+        /// For Asserting
+        /// </summary>
+        private bool FieldSeen(string field)
+        {
+            Debug.Assert(!_fieldsSeen.Contains(field), "field \"" + field + "\" was added more than once during flush");
+            _fieldsSeen.Add(field);
+            return true;
+        }
+
         public override void AddNumericField(FieldInfo field, IEnumerable<long?> values)
         {
             Debug.Assert(FieldSeen(field.Name));
@@ -396,6 +407,18 @@ namespace Lucene.Net.Codecs.SimpleText
             }
         }
 
+        /// <summary>Write the header for this field </summary>
+        private void WriteFieldEntry(FieldInfo field, DocValuesType type)
+        {
+            SimpleTextUtil.Write(data, FIELD);
+            SimpleTextUtil.Write(data, field.Name, scratch);
+            SimpleTextUtil.WriteNewline(data);
+
+            SimpleTextUtil.Write(data, TYPE);
+            SimpleTextUtil.Write(data, type.ToString(), scratch);
+            SimpleTextUtil.WriteNewline(data);
+        }
+
         protected override void Dispose(bool disposing)
         {
             if (data == null || !disposing) return;
@@ -422,30 +445,5 @@ namespace Lucene.Net.Codecs.SimpleText
                 data = null;
             }
         }
-
-        /// <summary>Write the header for this field </summary>
-        private void WriteFieldEntry(FieldInfo field, DocValuesType type)
-        {
-            SimpleTextUtil.Write(data, FIELD);
-            SimpleTextUtil.Write(data, field.Name, scratch);
-            SimpleTextUtil.WriteNewline(data);
-
-            SimpleTextUtil.Write(data, TYPE);
-            SimpleTextUtil.Write(data, type.ToString(), scratch);
-            SimpleTextUtil.WriteNewline(data);
-        }
-
-        /// <summary>
-        /// For Asserting
-        /// </summary>
-        /// <param name="field"></param>
-        /// <returns></returns>
-        private bool FieldSeen(string field)
-        {
-            Debug.Assert(!_fieldsSeen.Contains(field), "field \"" + field + "\" was added more than once during flush");
-            _fieldsSeen.Add(field);
-            return true;
-        }
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
index 67e50b1..e3a9e47 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosReader.cs
@@ -165,7 +165,7 @@ namespace Lucene.Net.Codecs.SimpleText
             return "false".Equals(dvType) ? null : (Index.DocValuesType?)Enum.Parse(typeof(Index.DocValuesType), dvType);
         }
 
-        private static string ReadString(int offset, BytesRef scratch)
+        private string ReadString(int offset, BytesRef scratch)
         {
             return Encoding.UTF8.GetString(scratch.Bytes, scratch.Offset + offset, scratch.Length - offset);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c602c98f/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
index 291916b..2f151b4 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldInfosWriter.cs
@@ -42,7 +42,6 @@ namespace Lucene.Net.Codecs.SimpleText
     /// </summary>
     public class SimpleTextFieldInfosWriter : FieldInfosWriter
     {
-
         /// <summary>
         /// Extension of field infos </summary>
         internal const string FIELD_INFOS_EXTENSION = "inf";
@@ -163,5 +162,4 @@ namespace Lucene.Net.Codecs.SimpleText
             return type.HasValue ? type.ToString() : "false";
         }
     }
-
 }
\ No newline at end of file


[23/37] lucenenet git commit: Lucene.Net.Codecs.Memory.DirectPostingsFormat.DirectField.DirectIntersectTermsEnum.State: removed TODOs about changing internal fields to properties

Posted by ni...@apache.org.
Lucene.Net.Codecs.Memory.DirectPostingsFormat.DirectField.DirectIntersectTermsEnum.State: removed TODOs about changing internal fields to properties


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

Branch: refs/heads/api-work
Commit: 5524a918e912648e1786cc743b708f205fe1163e
Parents: 9fc749d
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 16:32:27 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:25 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5524a918/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
index 498596b..ff4a327 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
@@ -1199,12 +1199,12 @@ namespace Lucene.Net.Codecs.Memory
                         this.outerInstance = outerInstance;
                     }
 
-                    internal int changeOrd; // LUCENENET TODO: Make Property
-                    internal int state; // LUCENENET TODO: Make Property
-                    internal Transition[] transitions; // LUCENENET TODO: Make Property
-                    internal int transitionUpto; // LUCENENET TODO: Make Property
-                    internal int transitionMax; // LUCENENET TODO: Make Property
-                    internal int transitionMin; // LUCENENET TODO: Make Property
+                    internal int changeOrd;
+                    internal int state;
+                    internal Transition[] transitions;
+                    internal int transitionUpto;
+                    internal int transitionMax;
+                    internal int transitionMin;
                 }
 
                 private State[] states;


[33/37] lucenenet git commit: Lucene.Net.Codecs: Renamed Intblock folder to IntBlock

Posted by ni...@apache.org.
Lucene.Net.Codecs: Renamed Intblock folder to IntBlock


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

Branch: refs/heads/api-work
Commit: 0159ad2fcfc39dc4e662326ca01c414f0350fdae
Parents: 5a5c215
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 18:00:51 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 18:00:51 2017 +0700

----------------------------------------------------------------------
 .../IntBlock/FixedIntBlockIndexInput.cs         | 196 ++++++++++++++++
 .../IntBlock/FixedIntBlockIndexOutput.cs        | 151 ++++++++++++
 .../IntBlock/VariableIntBlockIndexInput.cs      | 229 +++++++++++++++++++
 .../IntBlock/VariableIntBlockIndexOutput.cs     | 162 +++++++++++++
 .../Intblock/FixedIntBlockIndexInput.cs         | 196 ----------------
 .../Intblock/FixedIntBlockIndexOutput.cs        | 151 ------------
 .../Intblock/VariableIntBlockIndexInput.cs      | 229 -------------------
 .../Intblock/VariableIntBlockIndexOutput.cs     | 162 -------------
 8 files changed, 738 insertions(+), 738 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0159ad2f/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
new file mode 100644
index 0000000..991b5f0
--- /dev/null
+++ b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
@@ -0,0 +1,196 @@
+\ufeffusing Lucene.Net.Codecs.Sep;
+using Lucene.Net.Store;
+using System.Diagnostics;
+
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    // Naive int block API that writes vInts.  This is
+    // expected to give poor performance; it's really only for
+    // testing the pluggability.  One should typically use pfor instead. 
+
+    /// <summary>
+    /// Abstract base class that reads fixed-size blocks of ints
+    ///  from an IndexInput.  While this is a simple approach, a
+    ///  more performant approach would directly create an impl
+    ///  of IntIndexInput inside Directory.  Wrapping a generic
+    ///  IndexInput will likely cost performance.
+    /// 
+    /// @lucene.experimental
+    /// </summary>
+    public abstract class FixedIntBlockIndexInput : IntIndexInput
+    {
+        private readonly IndexInput input;
+        protected readonly int m_blockSize;
+
+        public FixedIntBlockIndexInput(IndexInput @in)
+        {
+            input = @in;
+            m_blockSize = @in.ReadVInt();
+        }
+
+        public override AbstractReader GetReader()
+        {
+            var buffer = new int[m_blockSize];
+            var clone = (IndexInput)input.Clone();
+            // TODO: can this be simplified?
+            return new Reader(clone, buffer, GetBlockReader(clone, buffer));
+        }
+
+        public override void Dispose()
+        {
+            input.Dispose();
+        }
+
+        public override AbstractIndex GetIndex()
+        {
+            return new Index(this);
+        }
+
+        protected abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
+
+
+        /// <summary>
+        /// Interface for fixed-size block decoders.
+        /// <para>
+        /// Implementations should decode into the buffer in <see cref="ReadBlock()"/>.
+        /// </para>
+        /// </summary>
+        public interface IBlockReader
+        {
+            void ReadBlock();
+        }
+
+        private class Reader : AbstractReader
+        {
+            private readonly IndexInput input;
+            private readonly IBlockReader blockReader;
+            private readonly int blockSize;
+            private readonly int[] pending;
+
+            private int upto;
+            private bool seekPending;
+            private long pendingFP;
+            private long lastBlockFP = -1;
+
+            public Reader(IndexInput input, int[] pending, IBlockReader blockReader)
+            {
+                this.input = input;
+                this.pending = pending;
+                this.blockSize = pending.Length;
+                this.blockReader = blockReader;
+                upto = blockSize;
+            }
+
+            internal virtual void Seek(long fp, int upto)
+            {
+                Debug.Assert(upto < blockSize);
+                if (seekPending || fp != lastBlockFP)
+                {
+                    pendingFP = fp;
+                    seekPending = true;
+                }
+                this.upto = upto;
+            }
+
+            public override int Next()
+            {
+                if (seekPending)
+                {
+                    // Seek & load new block
+                    input.Seek(pendingFP);
+                    lastBlockFP = pendingFP;
+                    blockReader.ReadBlock();
+                    seekPending = false;
+                }
+                else if (upto == blockSize)
+                {
+                    // Load new block
+                    lastBlockFP = input.FilePointer;
+                    blockReader.ReadBlock();
+                    upto = 0;
+                }
+                return pending[upto++];
+            }
+        }
+
+        private class Index : AbstractIndex
+        {
+            private readonly FixedIntBlockIndexInput outerInstance;
+
+            public Index(FixedIntBlockIndexInput outerInstance)
+            {
+                this.outerInstance = outerInstance;
+            }
+
+            private long fp;
+            private int upto;
+
+            public override void Read(DataInput indexIn, bool absolute)
+            {
+                if (absolute)
+                {
+                    upto = indexIn.ReadVInt();
+                    fp = indexIn.ReadVLong();
+                }
+                else
+                {
+                    int uptoDelta = indexIn.ReadVInt();
+                    if ((uptoDelta & 1) == 1)
+                    {
+                        // same block
+                        upto += (int)((uint)uptoDelta >> 1);
+                    }
+                    else
+                    {
+                        // new block
+                        upto = (int)((uint)uptoDelta >> 1);
+                        fp += indexIn.ReadVLong();
+                    }
+                }
+                Debug.Assert(upto < outerInstance.m_blockSize);
+            }
+
+            public override void Seek(AbstractReader other)
+            {
+                ((Reader)other).Seek(fp, upto);
+            }
+
+            public override void CopyFrom(AbstractIndex other)
+            {
+                Index idx = (Index)other;
+                fp = idx.fp;
+                upto = idx.upto;
+            }
+
+            public override AbstractIndex Clone()
+            {
+                Index other = new Index(outerInstance);
+                other.fp = fp;
+                other.upto = upto;
+                return other;
+            }
+
+            public override string ToString()
+            {
+                return "fp=" + fp + " upto=" + upto;
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0159ad2f/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexOutput.cs
new file mode 100644
index 0000000..544b644
--- /dev/null
+++ b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexOutput.cs
@@ -0,0 +1,151 @@
+\ufeffusing Lucene.Net.Codecs.Sep;
+using Lucene.Net.Store;
+using System.Diagnostics;
+
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// Naive int block API that writes vInts.  This is
+    ///  expected to give poor performance; it's really only for
+    ///  testing the pluggability.  One should typically use pfor instead. 
+    /// </summary>
+
+
+    /// <summary>
+    /// Abstract base class that writes fixed-size blocks of ints
+    ///  to an IndexOutput.  While this is a simple approach, a
+    ///  more performant approach would directly create an impl
+    ///  of IntIndexOutput inside Directory.  Wrapping a generic
+    ///  IndexInput will likely cost performance.
+    /// 
+    /// @lucene.experimental
+    /// </summary>
+    public abstract class FixedIntBlockIndexOutput : IntIndexOutput
+    {
+        protected readonly IndexOutput m_output;
+        private readonly int blockSize;
+        protected readonly int[] m_buffer;
+        private int upto;
+
+        protected FixedIntBlockIndexOutput(IndexOutput output, int fixedBlockSize)
+        {
+            blockSize = fixedBlockSize;
+            this.m_output = output;
+            output.WriteVInt(blockSize);
+            m_buffer = new int[blockSize];
+        }
+
+        protected abstract void FlushBlock();
+
+        public override AbstractIndex GetIndex()
+        {
+            return new Index(this);
+        }
+
+        private class Index : AbstractIndex
+        {
+            private readonly FixedIntBlockIndexOutput outerInstance;
+
+            public Index(FixedIntBlockIndexOutput outerInstance)
+            {
+                this.outerInstance = outerInstance;
+            }
+
+            internal long fp;
+            internal int upto;
+            internal long lastFP;
+            internal int lastUpto;
+
+            public override void Mark()
+            {
+                fp = outerInstance.m_output.FilePointer;
+                upto = outerInstance.upto;
+            }
+
+            public override void CopyFrom(AbstractIndex other, bool copyLast)
+            {
+                Index idx = (Index)other;
+                fp = idx.fp;
+                upto = idx.upto;
+                if (copyLast)
+                {
+                    lastFP = fp;
+                    lastUpto = upto;
+                }
+            }
+
+            public override void Write(DataOutput indexOut, bool absolute)
+            {
+                if (absolute)
+                {
+                    indexOut.WriteVInt(upto);
+                    indexOut.WriteVLong(fp);
+                }
+                else if (fp == lastFP)
+                {
+                    // same block
+                    Debug.Assert(upto >= lastUpto);
+                    int uptoDelta = upto - lastUpto;
+                    indexOut.WriteVInt(uptoDelta << 1 | 1);
+                }
+                else
+                {
+                    // new block
+                    indexOut.WriteVInt(upto << 1);
+                    indexOut.WriteVLong(fp - lastFP);
+                }
+                lastUpto = upto;
+                lastFP = fp;
+            }
+
+            public override string ToString()
+            {
+                return "fp=" + fp + " upto=" + upto;
+            }
+        }
+
+        public override void Write(int v)
+        {
+            m_buffer[upto++] = v;
+            if (upto == blockSize)
+            {
+                FlushBlock();
+                upto = 0;
+            }
+        }
+
+        public override void Dispose()
+        {
+            try
+            {
+                if (upto > 0)
+                {
+                    // NOTE: entries in the block after current upto are
+                    // invalid
+                    FlushBlock();
+                }
+            }
+            finally
+            {
+                m_output.Dispose();
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0159ad2f/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
new file mode 100644
index 0000000..6607801
--- /dev/null
+++ b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
@@ -0,0 +1,229 @@
+\ufeffusing Lucene.Net.Codecs.Sep;
+using Lucene.Net.Store;
+using Lucene.Net.Support;
+using System.Diagnostics;
+
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    // Naive int block API that writes vInts.  This is
+    // expected to give poor performance; it's really only for
+    // testing the pluggability.  One should typically use pfor instead. 
+
+    // TODO: much of this can be shared code w/ the fixed case
+
+    /// <summary>
+    /// Abstract base class that reads variable-size blocks of ints
+    /// from an IndexInput.  While this is a simple approach, a
+    /// more performant approach would directly create an impl
+    /// of IntIndexInput inside Directory.  Wrapping a generic
+    /// IndexInput will likely cost performance.
+    /// 
+    /// @lucene.experimental
+    /// </summary>
+    public abstract class VariableIntBlockIndexInput : IntIndexInput
+    {
+        private readonly IndexInput input;
+        protected readonly int m_maxBlockSize;
+
+        protected internal VariableIntBlockIndexInput(IndexInput input)
+        {
+            this.input = input;
+            m_maxBlockSize = input.ReadInt();
+        }
+
+        public override AbstractReader GetReader()
+        {
+            var buffer = new int[m_maxBlockSize];
+            var clone = (IndexInput)input.Clone();
+            // TODO: can this be simplified?
+            return new Reader(clone, buffer, GetBlockReader(clone, buffer));
+        }
+
+        public override void Dispose()
+        {
+            input.Dispose();
+        }
+
+        public override AbstractIndex GetIndex()
+        {
+            return new Index(this);
+        }
+
+        protected abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
+
+        /// <summary>
+        /// Interface for variable-size block decoders.
+        /// <para>
+        /// Implementations should decode into the buffer in <see cref="ReadBlock()"/>.
+        /// </para>
+        /// </summary>
+        public interface IBlockReader
+        {
+            int ReadBlock();
+            void Seek(long pos);
+        }
+
+        private class Reader : AbstractReader
+        {
+            private readonly IndexInput input;
+
+            [WritableArray]
+            public int[] Pending
+            {
+                get { return pending; }
+            }
+            private readonly int[] pending;
+            private int upto;
+
+            private bool seekPending;
+            private long pendingFP;
+            private int pendingUpto;
+            private long lastBlockFP;
+            private int blockSize;
+            private readonly IBlockReader blockReader;
+
+            public Reader(IndexInput input, int[] pending, IBlockReader blockReader)
+            {
+                this.input = input;
+                this.pending = pending;
+                this.blockReader = blockReader;
+            }
+
+            internal virtual void Seek(long fp, int upto)
+            {
+                // TODO: should we do this in real-time, not lazy?
+                pendingFP = fp;
+                pendingUpto = upto;
+                Debug.Assert(pendingUpto >= 0, "pendingUpto=" + pendingUpto);
+                seekPending = true;
+            }
+
+            private void MaybeSeek()
+            {
+                if (seekPending)
+                {
+                    if (pendingFP != lastBlockFP)
+                    {
+                        // need new block
+                        input.Seek(pendingFP);
+                        blockReader.Seek(pendingFP);
+                        lastBlockFP = pendingFP;
+                        blockSize = blockReader.ReadBlock();
+                    }
+                    upto = pendingUpto;
+
+                    // TODO: if we were more clever when writing the
+                    // index, such that a seek point wouldn't be written
+                    // until the int encoder "committed", we could avoid
+                    // this (likely minor) inefficiency:
+
+                    // This is necessary for int encoders that are
+                    // non-causal, ie must see future int values to
+                    // encode the current ones.
+                    while (upto >= blockSize)
+                    {
+                        upto -= blockSize;
+                        lastBlockFP = input.FilePointer;
+                        blockSize = blockReader.ReadBlock();
+                    }
+                    seekPending = false;
+                }
+            }
+
+            public override int Next()
+            {
+                this.MaybeSeek();
+                if (upto == blockSize)
+                {
+                    lastBlockFP = input.FilePointer;
+                    blockSize = blockReader.ReadBlock();
+                    upto = 0;
+                }
+
+                return pending[upto++];
+            }
+        }
+
+        private class Index : AbstractIndex
+        {
+            private readonly VariableIntBlockIndexInput outerInstance;
+
+            public Index(VariableIntBlockIndexInput outerInstance)
+            {
+                this.outerInstance = outerInstance;
+            }
+
+            private long fp;
+            private int upto;
+
+            public override void Read(DataInput indexIn, bool absolute)
+            {
+                if (absolute)
+                {
+                    upto = indexIn.ReadVInt();
+                    fp = indexIn.ReadVLong();
+                }
+                else
+                {
+                    int uptoDelta = indexIn.ReadVInt();
+                    if ((uptoDelta & 1) == 1)
+                    {
+                        // same block
+                        upto += (int)((uint)uptoDelta >> 1);
+                    }
+                    else
+                    {
+                        // new block
+                        upto = (int)((uint)uptoDelta >> 1);
+                        fp += indexIn.ReadVLong();
+                    }
+                }
+                // TODO: we can't do this assert because non-causal
+                // int encoders can have upto over the buffer size
+                //assert upto < maxBlockSize: "upto=" + upto + " max=" + maxBlockSize;
+            }
+
+            public override string ToString()
+            {
+                return "VarIntBlock.Index fp=" + fp + " upto=" + upto + " maxBlock=" + outerInstance.m_maxBlockSize;
+            }
+
+            public override void Seek(AbstractReader other)
+            {
+                ((Reader)other).Seek(fp, upto);
+            }
+
+            public override void CopyFrom(AbstractIndex other)
+            {
+                Index idx = (Index)other;
+                fp = idx.fp;
+                upto = idx.upto;
+            }
+
+            public override AbstractIndex Clone()
+            {
+                Index other = new Index(outerInstance);
+                other.fp = fp;
+                other.upto = upto;
+                return other;
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0159ad2f/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexOutput.cs
new file mode 100644
index 0000000..f756777
--- /dev/null
+++ b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexOutput.cs
@@ -0,0 +1,162 @@
+\ufeffusing Lucene.Net.Codecs.Sep;
+using Lucene.Net.Store;
+using System.Diagnostics;
+
+namespace Lucene.Net.Codecs.IntBlock
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// Naive int block API that writes vInts.  This is
+    /// expected to give poor performance; it's really only for
+    /// testing the pluggability.  One should typically use pfor instead. 
+    /// </summary>
+
+
+    // TODO: much of this can be shared code w/ the fixed case
+
+    /// <summary>
+    /// Abstract base class that writes variable-size blocks of ints
+    ///  to an IndexOutput.  While this is a simple approach, a
+    ///  more performant approach would directly create an impl
+    ///  of IntIndexOutput inside Directory.  Wrapping a generic
+    ///  IndexInput will likely cost performance.
+    /// 
+    /// @lucene.experimental
+    /// </summary>
+    public abstract class VariableIntBlockIndexOutput : IntIndexOutput
+    {
+        protected readonly IndexOutput m_output;
+
+        private int upto;
+        private bool hitExcDuringWrite;
+
+        // TODO what Var-Var codecs exist in practice... and what are there blocksizes like?
+        // if its less than 128 we should set that as max and use byte?
+
+        /// <summary>
+        /// NOTE: maxBlockSize must be the maximum block size 
+        ///  plus the max non-causal lookahead of your codec.  EG Simple9
+        ///  requires lookahead=1 because on seeing the Nth value
+        ///  it knows it must now encode the N-1 values before it. 
+        /// </summary>
+        protected VariableIntBlockIndexOutput(IndexOutput output, int maxBlockSize)
+        {
+            this.m_output = output;
+            this.m_output.WriteInt(maxBlockSize);
+        }
+
+        /// <summary>
+        /// Called one value at a time.  Return the number of
+        /// buffered input values that have been written to out. 
+        /// </summary>
+        protected abstract int Add(int value);
+
+        public override AbstractIndex GetIndex()
+        {
+            return new Index(this);
+        }
+
+        private class Index : AbstractIndex
+        {
+            private readonly VariableIntBlockIndexOutput outerInstance;
+
+            public Index(VariableIntBlockIndexOutput outerInstance)
+            {
+                this.outerInstance = outerInstance;
+            }
+
+            private long fp;
+            private int upto;
+            private long lastFP;
+            private int lastUpto;
+
+            public override void Mark()
+            {
+                fp = outerInstance.m_output.FilePointer;
+                upto = outerInstance.upto;
+            }
+
+            public override void CopyFrom(AbstractIndex other, bool copyLast)
+            {
+                Index idx = (Index)other;
+                fp = idx.fp;
+                upto = idx.upto;
+                if (copyLast)
+                {
+                    lastFP = fp;
+                    lastUpto = upto;
+                }
+            }
+
+            public override void Write(DataOutput indexOut, bool absolute)
+            {
+                Debug.Assert(upto >= 0);
+                if (absolute)
+                {
+                    indexOut.WriteVInt(upto);
+                    indexOut.WriteVLong(fp);
+                }
+                else if (fp == lastFP)
+                {
+                    // same block
+                    Debug.Assert(upto >= lastUpto);
+                    int uptoDelta = upto - lastUpto;
+                    indexOut.WriteVInt(uptoDelta << 1 | 1);
+                }
+                else
+                {
+                    // new block
+                    indexOut.WriteVInt(upto << 1);
+                    indexOut.WriteVLong(fp - lastFP);
+                }
+                lastUpto = upto;
+                lastFP = fp;
+            }
+        }
+
+        public override void Write(int v)
+        {
+            hitExcDuringWrite = true;
+            upto -= Add(v) - 1;
+            hitExcDuringWrite = false;
+            Debug.Assert(upto >= 0);
+        }
+
+        public override void Dispose()
+        {
+            try
+            {
+                if (hitExcDuringWrite) return;
+
+                // stuff 0s in until the "real" data is flushed:
+                var stuffed = 0;
+                while (upto > stuffed)
+                {
+                    upto -= Add(0) - 1;
+                    Debug.Assert(upto >= 0);
+                    stuffed += 1;
+                }
+            }
+            finally
+            {
+                m_output.Dispose();
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0159ad2f/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
deleted file mode 100644
index 991b5f0..0000000
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
+++ /dev/null
@@ -1,196 +0,0 @@
-\ufeffusing Lucene.Net.Codecs.Sep;
-using Lucene.Net.Store;
-using System.Diagnostics;
-
-namespace Lucene.Net.Codecs.IntBlock
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    // Naive int block API that writes vInts.  This is
-    // expected to give poor performance; it's really only for
-    // testing the pluggability.  One should typically use pfor instead. 
-
-    /// <summary>
-    /// Abstract base class that reads fixed-size blocks of ints
-    ///  from an IndexInput.  While this is a simple approach, a
-    ///  more performant approach would directly create an impl
-    ///  of IntIndexInput inside Directory.  Wrapping a generic
-    ///  IndexInput will likely cost performance.
-    /// 
-    /// @lucene.experimental
-    /// </summary>
-    public abstract class FixedIntBlockIndexInput : IntIndexInput
-    {
-        private readonly IndexInput input;
-        protected readonly int m_blockSize;
-
-        public FixedIntBlockIndexInput(IndexInput @in)
-        {
-            input = @in;
-            m_blockSize = @in.ReadVInt();
-        }
-
-        public override AbstractReader GetReader()
-        {
-            var buffer = new int[m_blockSize];
-            var clone = (IndexInput)input.Clone();
-            // TODO: can this be simplified?
-            return new Reader(clone, buffer, GetBlockReader(clone, buffer));
-        }
-
-        public override void Dispose()
-        {
-            input.Dispose();
-        }
-
-        public override AbstractIndex GetIndex()
-        {
-            return new Index(this);
-        }
-
-        protected abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
-
-
-        /// <summary>
-        /// Interface for fixed-size block decoders.
-        /// <para>
-        /// Implementations should decode into the buffer in <see cref="ReadBlock()"/>.
-        /// </para>
-        /// </summary>
-        public interface IBlockReader
-        {
-            void ReadBlock();
-        }
-
-        private class Reader : AbstractReader
-        {
-            private readonly IndexInput input;
-            private readonly IBlockReader blockReader;
-            private readonly int blockSize;
-            private readonly int[] pending;
-
-            private int upto;
-            private bool seekPending;
-            private long pendingFP;
-            private long lastBlockFP = -1;
-
-            public Reader(IndexInput input, int[] pending, IBlockReader blockReader)
-            {
-                this.input = input;
-                this.pending = pending;
-                this.blockSize = pending.Length;
-                this.blockReader = blockReader;
-                upto = blockSize;
-            }
-
-            internal virtual void Seek(long fp, int upto)
-            {
-                Debug.Assert(upto < blockSize);
-                if (seekPending || fp != lastBlockFP)
-                {
-                    pendingFP = fp;
-                    seekPending = true;
-                }
-                this.upto = upto;
-            }
-
-            public override int Next()
-            {
-                if (seekPending)
-                {
-                    // Seek & load new block
-                    input.Seek(pendingFP);
-                    lastBlockFP = pendingFP;
-                    blockReader.ReadBlock();
-                    seekPending = false;
-                }
-                else if (upto == blockSize)
-                {
-                    // Load new block
-                    lastBlockFP = input.FilePointer;
-                    blockReader.ReadBlock();
-                    upto = 0;
-                }
-                return pending[upto++];
-            }
-        }
-
-        private class Index : AbstractIndex
-        {
-            private readonly FixedIntBlockIndexInput outerInstance;
-
-            public Index(FixedIntBlockIndexInput outerInstance)
-            {
-                this.outerInstance = outerInstance;
-            }
-
-            private long fp;
-            private int upto;
-
-            public override void Read(DataInput indexIn, bool absolute)
-            {
-                if (absolute)
-                {
-                    upto = indexIn.ReadVInt();
-                    fp = indexIn.ReadVLong();
-                }
-                else
-                {
-                    int uptoDelta = indexIn.ReadVInt();
-                    if ((uptoDelta & 1) == 1)
-                    {
-                        // same block
-                        upto += (int)((uint)uptoDelta >> 1);
-                    }
-                    else
-                    {
-                        // new block
-                        upto = (int)((uint)uptoDelta >> 1);
-                        fp += indexIn.ReadVLong();
-                    }
-                }
-                Debug.Assert(upto < outerInstance.m_blockSize);
-            }
-
-            public override void Seek(AbstractReader other)
-            {
-                ((Reader)other).Seek(fp, upto);
-            }
-
-            public override void CopyFrom(AbstractIndex other)
-            {
-                Index idx = (Index)other;
-                fp = idx.fp;
-                upto = idx.upto;
-            }
-
-            public override AbstractIndex Clone()
-            {
-                Index other = new Index(outerInstance);
-                other.fp = fp;
-                other.upto = upto;
-                return other;
-            }
-
-            public override string ToString()
-            {
-                return "fp=" + fp + " upto=" + upto;
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0159ad2f/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
deleted file mode 100644
index 544b644..0000000
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexOutput.cs
+++ /dev/null
@@ -1,151 +0,0 @@
-\ufeffusing Lucene.Net.Codecs.Sep;
-using Lucene.Net.Store;
-using System.Diagnostics;
-
-namespace Lucene.Net.Codecs.IntBlock
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    /// <summary>
-    /// Naive int block API that writes vInts.  This is
-    ///  expected to give poor performance; it's really only for
-    ///  testing the pluggability.  One should typically use pfor instead. 
-    /// </summary>
-
-
-    /// <summary>
-    /// Abstract base class that writes fixed-size blocks of ints
-    ///  to an IndexOutput.  While this is a simple approach, a
-    ///  more performant approach would directly create an impl
-    ///  of IntIndexOutput inside Directory.  Wrapping a generic
-    ///  IndexInput will likely cost performance.
-    /// 
-    /// @lucene.experimental
-    /// </summary>
-    public abstract class FixedIntBlockIndexOutput : IntIndexOutput
-    {
-        protected readonly IndexOutput m_output;
-        private readonly int blockSize;
-        protected readonly int[] m_buffer;
-        private int upto;
-
-        protected FixedIntBlockIndexOutput(IndexOutput output, int fixedBlockSize)
-        {
-            blockSize = fixedBlockSize;
-            this.m_output = output;
-            output.WriteVInt(blockSize);
-            m_buffer = new int[blockSize];
-        }
-
-        protected abstract void FlushBlock();
-
-        public override AbstractIndex GetIndex()
-        {
-            return new Index(this);
-        }
-
-        private class Index : AbstractIndex
-        {
-            private readonly FixedIntBlockIndexOutput outerInstance;
-
-            public Index(FixedIntBlockIndexOutput outerInstance)
-            {
-                this.outerInstance = outerInstance;
-            }
-
-            internal long fp;
-            internal int upto;
-            internal long lastFP;
-            internal int lastUpto;
-
-            public override void Mark()
-            {
-                fp = outerInstance.m_output.FilePointer;
-                upto = outerInstance.upto;
-            }
-
-            public override void CopyFrom(AbstractIndex other, bool copyLast)
-            {
-                Index idx = (Index)other;
-                fp = idx.fp;
-                upto = idx.upto;
-                if (copyLast)
-                {
-                    lastFP = fp;
-                    lastUpto = upto;
-                }
-            }
-
-            public override void Write(DataOutput indexOut, bool absolute)
-            {
-                if (absolute)
-                {
-                    indexOut.WriteVInt(upto);
-                    indexOut.WriteVLong(fp);
-                }
-                else if (fp == lastFP)
-                {
-                    // same block
-                    Debug.Assert(upto >= lastUpto);
-                    int uptoDelta = upto - lastUpto;
-                    indexOut.WriteVInt(uptoDelta << 1 | 1);
-                }
-                else
-                {
-                    // new block
-                    indexOut.WriteVInt(upto << 1);
-                    indexOut.WriteVLong(fp - lastFP);
-                }
-                lastUpto = upto;
-                lastFP = fp;
-            }
-
-            public override string ToString()
-            {
-                return "fp=" + fp + " upto=" + upto;
-            }
-        }
-
-        public override void Write(int v)
-        {
-            m_buffer[upto++] = v;
-            if (upto == blockSize)
-            {
-                FlushBlock();
-                upto = 0;
-            }
-        }
-
-        public override void Dispose()
-        {
-            try
-            {
-                if (upto > 0)
-                {
-                    // NOTE: entries in the block after current upto are
-                    // invalid
-                    FlushBlock();
-                }
-            }
-            finally
-            {
-                m_output.Dispose();
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0159ad2f/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
deleted file mode 100644
index 6607801..0000000
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
+++ /dev/null
@@ -1,229 +0,0 @@
-\ufeffusing Lucene.Net.Codecs.Sep;
-using Lucene.Net.Store;
-using Lucene.Net.Support;
-using System.Diagnostics;
-
-namespace Lucene.Net.Codecs.IntBlock
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    // Naive int block API that writes vInts.  This is
-    // expected to give poor performance; it's really only for
-    // testing the pluggability.  One should typically use pfor instead. 
-
-    // TODO: much of this can be shared code w/ the fixed case
-
-    /// <summary>
-    /// Abstract base class that reads variable-size blocks of ints
-    /// from an IndexInput.  While this is a simple approach, a
-    /// more performant approach would directly create an impl
-    /// of IntIndexInput inside Directory.  Wrapping a generic
-    /// IndexInput will likely cost performance.
-    /// 
-    /// @lucene.experimental
-    /// </summary>
-    public abstract class VariableIntBlockIndexInput : IntIndexInput
-    {
-        private readonly IndexInput input;
-        protected readonly int m_maxBlockSize;
-
-        protected internal VariableIntBlockIndexInput(IndexInput input)
-        {
-            this.input = input;
-            m_maxBlockSize = input.ReadInt();
-        }
-
-        public override AbstractReader GetReader()
-        {
-            var buffer = new int[m_maxBlockSize];
-            var clone = (IndexInput)input.Clone();
-            // TODO: can this be simplified?
-            return new Reader(clone, buffer, GetBlockReader(clone, buffer));
-        }
-
-        public override void Dispose()
-        {
-            input.Dispose();
-        }
-
-        public override AbstractIndex GetIndex()
-        {
-            return new Index(this);
-        }
-
-        protected abstract IBlockReader GetBlockReader(IndexInput @in, int[] buffer);
-
-        /// <summary>
-        /// Interface for variable-size block decoders.
-        /// <para>
-        /// Implementations should decode into the buffer in <see cref="ReadBlock()"/>.
-        /// </para>
-        /// </summary>
-        public interface IBlockReader
-        {
-            int ReadBlock();
-            void Seek(long pos);
-        }
-
-        private class Reader : AbstractReader
-        {
-            private readonly IndexInput input;
-
-            [WritableArray]
-            public int[] Pending
-            {
-                get { return pending; }
-            }
-            private readonly int[] pending;
-            private int upto;
-
-            private bool seekPending;
-            private long pendingFP;
-            private int pendingUpto;
-            private long lastBlockFP;
-            private int blockSize;
-            private readonly IBlockReader blockReader;
-
-            public Reader(IndexInput input, int[] pending, IBlockReader blockReader)
-            {
-                this.input = input;
-                this.pending = pending;
-                this.blockReader = blockReader;
-            }
-
-            internal virtual void Seek(long fp, int upto)
-            {
-                // TODO: should we do this in real-time, not lazy?
-                pendingFP = fp;
-                pendingUpto = upto;
-                Debug.Assert(pendingUpto >= 0, "pendingUpto=" + pendingUpto);
-                seekPending = true;
-            }
-
-            private void MaybeSeek()
-            {
-                if (seekPending)
-                {
-                    if (pendingFP != lastBlockFP)
-                    {
-                        // need new block
-                        input.Seek(pendingFP);
-                        blockReader.Seek(pendingFP);
-                        lastBlockFP = pendingFP;
-                        blockSize = blockReader.ReadBlock();
-                    }
-                    upto = pendingUpto;
-
-                    // TODO: if we were more clever when writing the
-                    // index, such that a seek point wouldn't be written
-                    // until the int encoder "committed", we could avoid
-                    // this (likely minor) inefficiency:
-
-                    // This is necessary for int encoders that are
-                    // non-causal, ie must see future int values to
-                    // encode the current ones.
-                    while (upto >= blockSize)
-                    {
-                        upto -= blockSize;
-                        lastBlockFP = input.FilePointer;
-                        blockSize = blockReader.ReadBlock();
-                    }
-                    seekPending = false;
-                }
-            }
-
-            public override int Next()
-            {
-                this.MaybeSeek();
-                if (upto == blockSize)
-                {
-                    lastBlockFP = input.FilePointer;
-                    blockSize = blockReader.ReadBlock();
-                    upto = 0;
-                }
-
-                return pending[upto++];
-            }
-        }
-
-        private class Index : AbstractIndex
-        {
-            private readonly VariableIntBlockIndexInput outerInstance;
-
-            public Index(VariableIntBlockIndexInput outerInstance)
-            {
-                this.outerInstance = outerInstance;
-            }
-
-            private long fp;
-            private int upto;
-
-            public override void Read(DataInput indexIn, bool absolute)
-            {
-                if (absolute)
-                {
-                    upto = indexIn.ReadVInt();
-                    fp = indexIn.ReadVLong();
-                }
-                else
-                {
-                    int uptoDelta = indexIn.ReadVInt();
-                    if ((uptoDelta & 1) == 1)
-                    {
-                        // same block
-                        upto += (int)((uint)uptoDelta >> 1);
-                    }
-                    else
-                    {
-                        // new block
-                        upto = (int)((uint)uptoDelta >> 1);
-                        fp += indexIn.ReadVLong();
-                    }
-                }
-                // TODO: we can't do this assert because non-causal
-                // int encoders can have upto over the buffer size
-                //assert upto < maxBlockSize: "upto=" + upto + " max=" + maxBlockSize;
-            }
-
-            public override string ToString()
-            {
-                return "VarIntBlock.Index fp=" + fp + " upto=" + upto + " maxBlock=" + outerInstance.m_maxBlockSize;
-            }
-
-            public override void Seek(AbstractReader other)
-            {
-                ((Reader)other).Seek(fp, upto);
-            }
-
-            public override void CopyFrom(AbstractIndex other)
-            {
-                Index idx = (Index)other;
-                fp = idx.fp;
-                upto = idx.upto;
-            }
-
-            public override AbstractIndex Clone()
-            {
-                Index other = new Index(outerInstance);
-                other.fp = fp;
-                other.upto = upto;
-                return other;
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0159ad2f/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
deleted file mode 100644
index f756777..0000000
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexOutput.cs
+++ /dev/null
@@ -1,162 +0,0 @@
-\ufeffusing Lucene.Net.Codecs.Sep;
-using Lucene.Net.Store;
-using System.Diagnostics;
-
-namespace Lucene.Net.Codecs.IntBlock
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    /// <summary>
-    /// Naive int block API that writes vInts.  This is
-    /// expected to give poor performance; it's really only for
-    /// testing the pluggability.  One should typically use pfor instead. 
-    /// </summary>
-
-
-    // TODO: much of this can be shared code w/ the fixed case
-
-    /// <summary>
-    /// Abstract base class that writes variable-size blocks of ints
-    ///  to an IndexOutput.  While this is a simple approach, a
-    ///  more performant approach would directly create an impl
-    ///  of IntIndexOutput inside Directory.  Wrapping a generic
-    ///  IndexInput will likely cost performance.
-    /// 
-    /// @lucene.experimental
-    /// </summary>
-    public abstract class VariableIntBlockIndexOutput : IntIndexOutput
-    {
-        protected readonly IndexOutput m_output;
-
-        private int upto;
-        private bool hitExcDuringWrite;
-
-        // TODO what Var-Var codecs exist in practice... and what are there blocksizes like?
-        // if its less than 128 we should set that as max and use byte?
-
-        /// <summary>
-        /// NOTE: maxBlockSize must be the maximum block size 
-        ///  plus the max non-causal lookahead of your codec.  EG Simple9
-        ///  requires lookahead=1 because on seeing the Nth value
-        ///  it knows it must now encode the N-1 values before it. 
-        /// </summary>
-        protected VariableIntBlockIndexOutput(IndexOutput output, int maxBlockSize)
-        {
-            this.m_output = output;
-            this.m_output.WriteInt(maxBlockSize);
-        }
-
-        /// <summary>
-        /// Called one value at a time.  Return the number of
-        /// buffered input values that have been written to out. 
-        /// </summary>
-        protected abstract int Add(int value);
-
-        public override AbstractIndex GetIndex()
-        {
-            return new Index(this);
-        }
-
-        private class Index : AbstractIndex
-        {
-            private readonly VariableIntBlockIndexOutput outerInstance;
-
-            public Index(VariableIntBlockIndexOutput outerInstance)
-            {
-                this.outerInstance = outerInstance;
-            }
-
-            private long fp;
-            private int upto;
-            private long lastFP;
-            private int lastUpto;
-
-            public override void Mark()
-            {
-                fp = outerInstance.m_output.FilePointer;
-                upto = outerInstance.upto;
-            }
-
-            public override void CopyFrom(AbstractIndex other, bool copyLast)
-            {
-                Index idx = (Index)other;
-                fp = idx.fp;
-                upto = idx.upto;
-                if (copyLast)
-                {
-                    lastFP = fp;
-                    lastUpto = upto;
-                }
-            }
-
-            public override void Write(DataOutput indexOut, bool absolute)
-            {
-                Debug.Assert(upto >= 0);
-                if (absolute)
-                {
-                    indexOut.WriteVInt(upto);
-                    indexOut.WriteVLong(fp);
-                }
-                else if (fp == lastFP)
-                {
-                    // same block
-                    Debug.Assert(upto >= lastUpto);
-                    int uptoDelta = upto - lastUpto;
-                    indexOut.WriteVInt(uptoDelta << 1 | 1);
-                }
-                else
-                {
-                    // new block
-                    indexOut.WriteVInt(upto << 1);
-                    indexOut.WriteVLong(fp - lastFP);
-                }
-                lastUpto = upto;
-                lastFP = fp;
-            }
-        }
-
-        public override void Write(int v)
-        {
-            hitExcDuringWrite = true;
-            upto -= Add(v) - 1;
-            hitExcDuringWrite = false;
-            Debug.Assert(upto >= 0);
-        }
-
-        public override void Dispose()
-        {
-            try
-            {
-                if (hitExcDuringWrite) return;
-
-                // stuff 0s in until the "real" data is flushed:
-                var stuffed = 0;
-                while (upto > stuffed)
-                {
-                    upto -= Add(0) - 1;
-                    Debug.Assert(upto >= 0);
-                    stuffed += 1;
-                }
-            }
-            finally
-            {
-                m_output.Dispose();
-            }
-        }
-    }
-}
\ No newline at end of file


[19/37] lucenenet git commit: Lucene.Net.Codecs.Sep.SepSkipListWriter refactor: PosOutput (setter only) > SetPosOutput(IntIndexOutput), PayloadOutput (setter only) > SetPayloadOutput(IndexOutput)

Posted by ni...@apache.org.
Lucene.Net.Codecs.Sep.SepSkipListWriter refactor: PosOutput (setter only) > SetPosOutput(IntIndexOutput), PayloadOutput (setter only) > SetPayloadOutput(IndexOutput)


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

Branch: refs/heads/api-work
Commit: a1c6d3d67e8a331f13e05a603528b8051c091aac
Parents: a5cffba
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 16:01:41 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:23 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a1c6d3d6/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
index d817d40..cbbd970 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs
@@ -90,21 +90,18 @@ namespace Lucene.Net.Codecs.Sep
             _indexOptions = v;
         }
 
-        internal virtual IntIndexOutput PosOutput // LUCENENET TODO: Make SetPosOutput(IntIndexOutput posOutput)
+        internal virtual void SetPosOutput(IntIndexOutput posOutput) 
         {
-            set
+            _posOutput = posOutput;
+            for (var i = 0; i < m_numberOfSkipLevels; i++)
             {
-                _posOutput = value;
-                for (var i = 0; i < m_numberOfSkipLevels; i++)
-                {
-                    _posIndex[i] = value.GetIndex();
-                }
+                _posIndex[i] = posOutput.GetIndex();
             }
         }
 
-        internal virtual IndexOutput PayloadOutput // LUCENENET TODO: Make SetPayloadOutput(IndexOutput payloadOutput)
+        internal virtual void SetPayloadOutput(IndexOutput payloadOutput)
         {
-            set { _payloadOutput = value; }
+            _payloadOutput = payloadOutput;
         }
 
         /// <summary>


[22/37] lucenenet git commit: Lucene.Net.Codecs.Memory.DirectPostingsFormat.HighFreqDocsEnum refactor: canResuse() > CanReuse()

Posted by ni...@apache.org.
Lucene.Net.Codecs.Memory.DirectPostingsFormat.HighFreqDocsEnum refactor: canResuse() > CanReuse()


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

Branch: refs/heads/api-work
Commit: 6998f2f3457d69cb3518f5369c67ae301ae67375
Parents: b0c227e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 16:07:37 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:24 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6998f2f3/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
index df0807a..e49bc0e 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
@@ -1082,7 +1082,7 @@ namespace Lucene.Net.Codecs.Memory
                         if (reuse is HighFreqDocsEnum)
                         {
                             docsEnum = (HighFreqDocsEnum) reuse;
-                            if (!docsEnum.canReuse(liveDocs))
+                            if (!docsEnum.CanReuse(liveDocs))
                             {
                                 docsEnum = new HighFreqDocsEnum(liveDocs);
                             }
@@ -2267,7 +2267,7 @@ namespace Lucene.Net.Codecs.Memory
                 this.liveDocs = liveDocs;
             }
 
-            public bool canReuse(IBits liveDocs) // LUCENENET TODO: Rename CanReuse()
+            public bool CanReuse(IBits liveDocs)
             {
                 return liveDocs == this.liveDocs;
             }


[31/37] lucenenet git commit: Lucene.Net.Codecs: Renamed all parameter names camelCase

Posted by ni...@apache.org.
Lucene.Net.Codecs: Renamed all parameter names camelCase


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

Branch: refs/heads/api-work
Commit: c0908b4ed790d31ddc6d666c9d988e226896feb2
Parents: 7660509
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 17:38:35 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:38:35 2017 +0700

----------------------------------------------------------------------
 .../Pulsing/PulsingPostingsReader.cs            | 64 ++++++++++----------
 .../Pulsing/PulsingPostingsWriter.cs            | 18 +++---
 src/Lucene.Net.Codecs/RectangularArrays.cs      | 12 ++--
 3 files changed, 47 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c0908b4e/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
index 7f64fab..8f776bc 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
@@ -160,64 +160,64 @@ namespace Lucene.Net.Codecs.Pulsing
             return new PulsingTermState {WrappedTermState = _wrappedPostingsReader.NewTermState()};
         }
 
-        public override void DecodeTerm(long[] empty, DataInput input, FieldInfo fieldInfo, BlockTermState _termState,
+        public override void DecodeTerm(long[] empty, DataInput input, FieldInfo fieldInfo, BlockTermState termState,
             bool absolute)
         {
-            var termState = (PulsingTermState) _termState;
+            var termState2 = (PulsingTermState) termState;
 
             Debug.Assert(empty.Length == 0);
 
-            termState.Absolute = termState.Absolute || absolute;
+            termState2.Absolute = termState2.Absolute || absolute;
             // if we have positions, its total TF, otherwise its computed based on docFreq.
             // TODO Double check this is right..
             long count = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS.CompareTo(fieldInfo.IndexOptions) <= 0
-                ? termState.TotalTermFreq
-                : termState.DocFreq;
+                ? termState2.TotalTermFreq
+                : termState2.DocFreq;
            
             if (count <= _maxPositions)
             {
                 // Inlined into terms dict -- just read the byte[] blob in,
                 // but don't decode it now (we only decode when a DocsEnum
                 // or D&PEnum is pulled):
-                termState.PostingsSize = input.ReadVInt();
-                if (termState.Postings == null || termState.Postings.Length < termState.PostingsSize)
+                termState2.PostingsSize = input.ReadVInt();
+                if (termState2.Postings == null || termState2.Postings.Length < termState2.PostingsSize)
                 {
-                    termState.Postings = new byte[ArrayUtil.Oversize(termState.PostingsSize, 1)];
+                    termState2.Postings = new byte[ArrayUtil.Oversize(termState2.PostingsSize, 1)];
                 }
                 // TODO: sort of silly to copy from one big byte[]
                 // (the blob holding all inlined terms' blobs for
                 // current term block) into another byte[] (just the
                 // blob for this term)...
-                input.ReadBytes(termState.Postings, 0, termState.PostingsSize);
+                input.ReadBytes(termState2.Postings, 0, termState2.PostingsSize);
                 //System.out.println("  inlined bytes=" + termState.postingsSize);
-                termState.Absolute = termState.Absolute || absolute;
+                termState2.Absolute = termState2.Absolute || absolute;
             }
             else
             {
                 var longsSize = _fields == null ? 0 : _fields[fieldInfo.Number];
-                if (termState.Longs == null)
+                if (termState2.Longs == null)
                 {
-                    termState.Longs = new long[longsSize];
+                    termState2.Longs = new long[longsSize];
                 }
                 for (var i = 0; i < longsSize; i++)
                 {
-                    termState.Longs[i] = input.ReadVLong();
+                    termState2.Longs[i] = input.ReadVLong();
                 }
-                termState.PostingsSize = -1;
-                termState.WrappedTermState.DocFreq = termState.DocFreq;
-                termState.WrappedTermState.TotalTermFreq = termState.TotalTermFreq;
-                _wrappedPostingsReader.DecodeTerm(termState.Longs, input, fieldInfo,
-                    termState.WrappedTermState,
-                    termState.Absolute);
-                termState.Absolute = false;
+                termState2.PostingsSize = -1;
+                termState2.WrappedTermState.DocFreq = termState2.DocFreq;
+                termState2.WrappedTermState.TotalTermFreq = termState2.TotalTermFreq;
+                _wrappedPostingsReader.DecodeTerm(termState2.Longs, input, fieldInfo,
+                    termState2.WrappedTermState,
+                    termState2.Absolute);
+                termState2.Absolute = false;
             }
         }
 
-        public override DocsEnum Docs(FieldInfo field, BlockTermState _termState, IBits liveDocs, DocsEnum reuse,
+        public override DocsEnum Docs(FieldInfo field, BlockTermState termState, IBits liveDocs, DocsEnum reuse,
             int flags)
         {
-            var termState = (PulsingTermState) _termState;
-            if (termState.PostingsSize != -1)
+            var termState2 = (PulsingTermState) termState;
+            if (termState2.PostingsSize != -1)
             {
                 PulsingDocsEnum postings;
                 if (reuse is PulsingDocsEnum)
@@ -245,27 +245,27 @@ namespace Lucene.Net.Codecs.Pulsing
                 if (reuse != postings)
                     SetOther(postings, reuse); // postings.other = reuse
                 
-                return postings.Reset(liveDocs, termState);
+                return postings.Reset(liveDocs, termState2);
             }
 
             if (!(reuse is PulsingDocsEnum))
-                return _wrappedPostingsReader.Docs(field, termState.WrappedTermState, liveDocs, reuse, flags);
+                return _wrappedPostingsReader.Docs(field, termState2.WrappedTermState, liveDocs, reuse, flags);
 
-            var wrapped = _wrappedPostingsReader.Docs(field, termState.WrappedTermState, liveDocs,
+            var wrapped = _wrappedPostingsReader.Docs(field, termState2.WrappedTermState, liveDocs,
                 GetOther(reuse), flags);
 
             SetOther(wrapped, reuse); // wrapped.other = reuse
             return wrapped;
         }
 
-        public override DocsAndPositionsEnum DocsAndPositions(FieldInfo field, BlockTermState _termState, IBits liveDocs,
+        public override DocsAndPositionsEnum DocsAndPositions(FieldInfo field, BlockTermState termState, IBits liveDocs,
             DocsAndPositionsEnum reuse,
             int flags)
         {
 
-            var termState = (PulsingTermState) _termState;
+            var termState2 = (PulsingTermState) termState;
 
-            if (termState.PostingsSize != -1)
+            if (termState2.PostingsSize != -1)
             {
                 PulsingDocsAndPositionsEnum postings;
                 if (reuse is PulsingDocsAndPositionsEnum)
@@ -293,15 +293,15 @@ namespace Lucene.Net.Codecs.Pulsing
                 {
                     SetOther(postings, reuse); // postings.other = reuse 
                 }
-                return postings.Reset(liveDocs, termState);
+                return postings.Reset(liveDocs, termState2);
             }
 
             if (!(reuse is PulsingDocsAndPositionsEnum))
-                return _wrappedPostingsReader.DocsAndPositions(field, termState.WrappedTermState, liveDocs, reuse,
+                return _wrappedPostingsReader.DocsAndPositions(field, termState2.WrappedTermState, liveDocs, reuse,
                     flags);
 
             var wrapped = _wrappedPostingsReader.DocsAndPositions(field,
-                termState.WrappedTermState,
+                termState2.WrappedTermState,
                 liveDocs, (DocsAndPositionsEnum) GetOther(reuse),
                 flags);
             SetOther(wrapped, reuse); // wrapped.other = reuse

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c0908b4e/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
index 3b1aa77..ac443f6 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsWriter.cs
@@ -260,19 +260,19 @@ namespace Lucene.Net.Codecs.Pulsing
         /// <summary>
         /// Called when we are done adding docs to this term
         /// </summary>
-        /// <param name="_state"></param>
-        public override void FinishTerm(BlockTermState _state)
+        /// <param name="state"></param>
+        public override void FinishTerm(BlockTermState state)
         {
-            var state = (PulsingTermState) _state;
+            var state2 = (PulsingTermState) state;
 
             Debug.Assert(_pendingCount > 0 || _pendingCount == -1);
 
             if (_pendingCount == -1)
             {
-                state.wrappedState.DocFreq = state.DocFreq;
-                state.wrappedState.TotalTermFreq = state.TotalTermFreq;
-                state.bytes = null;
-                _wrappedPostingsWriter.FinishTerm(state.wrappedState);
+                state2.wrappedState.DocFreq = state2.DocFreq;
+                state2.wrappedState.TotalTermFreq = state2.TotalTermFreq;
+                state2.bytes = null;
+                _wrappedPostingsWriter.FinishTerm(state2.wrappedState);
             }
             else
             {
@@ -403,8 +403,8 @@ namespace Lucene.Net.Codecs.Pulsing
                         break;
                 }
 
-                state.bytes = new byte[(int) _buffer.FilePointer];
-                _buffer.WriteTo(state.bytes, 0);
+                state2.bytes = new byte[(int) _buffer.FilePointer];
+                _buffer.WriteTo(state2.bytes, 0);
                 _buffer.Reset();
             }
             _pendingCount = 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c0908b4e/src/Lucene.Net.Codecs/RectangularArrays.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/RectangularArrays.cs b/src/Lucene.Net.Codecs/RectangularArrays.cs
index 476fc1b..d98e410 100644
--- a/src/Lucene.Net.Codecs/RectangularArrays.cs
+++ b/src/Lucene.Net.Codecs/RectangularArrays.cs
@@ -7,17 +7,17 @@
 //----------------------------------------------------------------------------------------
 internal static partial class RectangularArrays // LUCENENET TODO: Move to Support ?
 {
-    internal static long[][] ReturnRectangularLongArray(int Size1, int Size2)
+    internal static long[][] ReturnRectangularLongArray(int size1, int size2)
     {
         long[][] Array;
-        if (Size1 > -1)
+        if (size1 > -1)
         {
-            Array = new long[Size1][];
-            if (Size2 > -1)
+            Array = new long[size1][];
+            if (size2 > -1)
             {
-                for (int Array1 = 0; Array1 < Size1; Array1++)
+                for (int Array1 = 0; Array1 < size1; Array1++)
                 {
-                    Array[Array1] = new long[Size2];
+                    Array[Array1] = new long[size2];
                 }
             }
         }


[11/37] lucenenet git commit: Lucene.Net.Codecs.Sep.IntIndexInput refactor: renamed IntIndexInputReader > AbstractReader, IntIndexInputIndex > AbstractIndex and nested both classes within IntIndexInput

Posted by ni...@apache.org.
Lucene.Net.Codecs.Sep.IntIndexInput refactor: renamed IntIndexInputReader > AbstractReader, IntIndexInputIndex > AbstractIndex and nested both classes within IntIndexInput


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

Branch: refs/heads/api-work
Commit: c4fad82de5b9f51b263b7e6ba9f907980d73aa38
Parents: e17cce9
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 15:01:41 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 15:01:41 2017 +0700

----------------------------------------------------------------------
 .../Intblock/FixedIntBlockIndexInput.cs         | 14 ++++----
 .../Intblock/VariableIntBlockIndexInput.cs      | 14 ++++----
 src/Lucene.Net.Codecs/Sep/IntIndexInput.cs      | 38 ++++++++++----------
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs  | 28 +++++++--------
 src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs  | 28 +++++++--------
 .../Codecs/MockSep/MockSingleIntIndexInput.cs   | 14 ++++----
 .../IntBlock/TestIntBlockCodec.cs               |  2 +-
 7 files changed, 68 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c4fad82d/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
index 7b9702a..7c27399 100644
--- a/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/FixedIntBlockIndexInput.cs
@@ -45,7 +45,7 @@ namespace Lucene.Net.Codecs.IntBlock
             blockSize = @in.ReadVInt();
         }
 
-        public override IntIndexInputReader GetReader()
+        public override AbstractReader GetReader()
         {
             var buffer = new int[blockSize];
             var clone = (IndexInput)input.Clone();
@@ -58,7 +58,7 @@ namespace Lucene.Net.Codecs.IntBlock
             input.Dispose();
         }
 
-        public override IntIndexInputIndex GetIndex()
+        public override AbstractIndex GetIndex()
         {
             return new InputIndex(this);
         }
@@ -77,7 +77,7 @@ namespace Lucene.Net.Codecs.IntBlock
             void ReadBlock();
         }
 
-        private class InputReader : IntIndexInputReader // LUCENENET TODO: Rename Reader
+        private class InputReader : AbstractReader // LUCENENET TODO: Rename Reader
         {
             private readonly IndexInput input;
             private readonly IBlockReader blockReader;
@@ -130,7 +130,7 @@ namespace Lucene.Net.Codecs.IntBlock
             }
         }
 
-        private class InputIndex : IntIndexInputIndex // LUCENENET TODO: Rename Index
+        private class InputIndex : AbstractIndex // LUCENENET TODO: Rename Index
         {
             private readonly FixedIntBlockIndexInput outerInstance;
 
@@ -167,19 +167,19 @@ namespace Lucene.Net.Codecs.IntBlock
                 Debug.Assert(upto < outerInstance.blockSize);
             }
 
-            public override void Seek(IntIndexInputReader other)
+            public override void Seek(AbstractReader other)
             {
                 ((InputReader)other).Seek(fp, upto);
             }
 
-            public override void CopyFrom(IntIndexInputIndex other)
+            public override void CopyFrom(AbstractIndex other)
             {
                 InputIndex idx = (InputIndex)other;
                 fp = idx.fp;
                 upto = idx.upto;
             }
 
-            public override IntIndexInputIndex Clone()
+            public override AbstractIndex Clone()
             {
                 InputIndex other = new InputIndex(outerInstance);
                 other.fp = fp;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c4fad82d/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
index 440de80..93376a2 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
@@ -47,7 +47,7 @@ namespace Lucene.Net.Codecs.IntBlock
             maxBlockSize = input.ReadInt();
         }
 
-        public override IntIndexInputReader GetReader()
+        public override AbstractReader GetReader()
         {
             var buffer = new int[maxBlockSize];
             var clone = (IndexInput)input.Clone();
@@ -60,7 +60,7 @@ namespace Lucene.Net.Codecs.IntBlock
             input.Dispose();
         }
 
-        public override IntIndexInputIndex GetIndex()
+        public override AbstractIndex GetIndex()
         {
             return new InputIndex(this);
         }
@@ -79,7 +79,7 @@ namespace Lucene.Net.Codecs.IntBlock
             void Seek(long pos);
         }
 
-        private class InputReader : IntIndexInputReader // LUCENENET TODO: Rename Reader
+        private class InputReader : AbstractReader // LUCENENET TODO: Rename Reader
         {
             private readonly IndexInput input;
 
@@ -155,7 +155,7 @@ namespace Lucene.Net.Codecs.IntBlock
             }
         }
 
-        private class InputIndex : IntIndexInputIndex // LUCENENET TODO: Rename Index
+        private class InputIndex : AbstractIndex // LUCENENET TODO: Rename Index
         {
             private readonly VariableIntBlockIndexInput outerInstance;
 
@@ -199,19 +199,19 @@ namespace Lucene.Net.Codecs.IntBlock
                 return "VarIntBlock.Index fp=" + fp + " upto=" + upto + " maxBlock=" + outerInstance.maxBlockSize;
             }
 
-            public override void Seek(IntIndexInputReader other)
+            public override void Seek(AbstractReader other)
             {
                 ((InputReader)other).Seek(fp, upto);
             }
 
-            public override void CopyFrom(IntIndexInputIndex other)
+            public override void CopyFrom(AbstractIndex other)
             {
                 InputIndex idx = (InputIndex)other;
                 fp = idx.fp;
                 upto = idx.upto;
             }
 
-            public override IntIndexInputIndex Clone()
+            public override AbstractIndex Clone()
             {
                 InputIndex other = new InputIndex(outerInstance);
                 other.fp = fp;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c4fad82d/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
index f67abe7..a0065c0 100644
--- a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
@@ -29,31 +29,29 @@ namespace Lucene.Net.Codecs.Sep
     /// </summary>
     public abstract class IntIndexInput : IDisposable
     {
-        public abstract IntIndexInputReader GetReader();
+        public abstract AbstractReader GetReader();
         public abstract void Dispose();
-        public abstract IntIndexInputIndex GetIndex();
+        public abstract AbstractIndex GetIndex();
 
-      
-    }
-    
-    /// <summary>Reads int values</summary>
-    public abstract class IntIndexInputReader // LUCENENET TODO: Rename AbstractReader and nest within IntIndexInput
-    {
-        /// <summary>Reads next single int</summary>
-        public abstract int Next();
-    }
+        /// <summary>
+        /// Records a single skip-point in the <see cref="IntIndexInput.GetReader"/>. </summary>
+        public abstract class AbstractIndex
+        {
+            public abstract void Read(DataInput indexIn, bool absolute);
 
-    /// <summary>
-    /// Records a single skip-point in the <seealso cref="IntIndexInput.GetReader"/>. </summary>
-    public abstract class IntIndexInputIndex // LUCENENET TODO: Rename AbstractIndex and nest within IntIndexInput
-    {
-        public abstract void Read(DataInput indexIn, bool absolute);
+            /// <summary>Seeks primary stream to the last read offset </summary>
+            public abstract void Seek(AbstractReader stream);
 
-        /// <summary>Seeks primary stream to the last read offset </summary>
-        public abstract void Seek(IntIndexInputReader stream);
+            public abstract void CopyFrom(AbstractIndex other);
 
-        public abstract void CopyFrom(IntIndexInputIndex other);
+            public abstract AbstractIndex Clone();
+        }
 
-        public abstract IntIndexInputIndex Clone();
+        /// <summary>Reads int values</summary>
+        public abstract class AbstractReader
+        {
+            /// <summary>Reads next single int</summary>
+            public abstract int Next();
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c4fad82d/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
index 5640fb2..84cf0e5 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
@@ -120,9 +120,9 @@ namespace Lucene.Net.Codecs.Sep
             // We store only the seek point to the docs file because
             // the rest of the info (freqIndex, posIndex, etc.) is
             // stored in the docs file:
-            internal IntIndexInputIndex DOC_INDEX;
-            internal IntIndexInputIndex POS_INDEX;
-            internal IntIndexInputIndex FREQ_INDEX;
+            internal IntIndexInput.AbstractIndex DOC_INDEX;
+            internal IntIndexInput.AbstractIndex POS_INDEX;
+            internal IntIndexInput.AbstractIndex FREQ_INDEX;
             internal long PAYLOAD_FP;
             internal long SKIP_FP;
 
@@ -309,13 +309,13 @@ namespace Lucene.Net.Codecs.Sep
             private IndexOptions _indexOptions;
             private bool _storePayloads;
             private IBits _liveDocs;
-            private readonly IntIndexInputReader _docReader;
-            private readonly IntIndexInputReader _freqReader;
+            private readonly IntIndexInput.AbstractReader _docReader;
+            private readonly IntIndexInput.AbstractReader _freqReader;
             private long _skipFp;
 
-            private readonly IntIndexInputIndex _docIndex;
-            private readonly IntIndexInputIndex _freqIndex;
-            private readonly IntIndexInputIndex _posIndex;
+            private readonly IntIndexInput.AbstractIndex _docIndex;
+            private readonly IntIndexInput.AbstractIndex _freqIndex;
+            private readonly IntIndexInput.AbstractIndex _posIndex;
             internal IntIndexInput START_DOC_IN; // LUCENENET TODO: Rename startDocIn
 
             // TODO: -- should we do hasProx with 2 different enum classes?
@@ -486,15 +486,15 @@ namespace Lucene.Net.Codecs.Sep
 
             private bool _storePayloads;
             private IBits _liveDocs;
-            private readonly IntIndexInputReader _docReader;
-            private readonly IntIndexInputReader _freqReader;
-            private readonly IntIndexInputReader _posReader;
+            private readonly IntIndexInput.AbstractReader _docReader;
+            private readonly IntIndexInput.AbstractReader _freqReader;
+            private readonly IntIndexInput.AbstractReader _posReader;
             private readonly IndexInput _payloadIn;
             private long _skipFp;
 
-            private readonly IntIndexInputIndex _docIndex;
-            private readonly IntIndexInputIndex _freqIndex;
-            private readonly IntIndexInputIndex _posIndex;
+            private readonly IntIndexInput.AbstractIndex _docIndex;
+            private readonly IntIndexInput.AbstractIndex _freqIndex;
+            private readonly IntIndexInput.AbstractIndex _posIndex;
             internal IntIndexInput START_DOC_IN; // LUCENENET TODO: Rename startDocIn
 
             private long _payloadFp;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c4fad82d/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
index 40951f7..210d468 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
@@ -33,15 +33,15 @@ namespace Lucene.Net.Codecs.Sep
     internal class SepSkipListReader : MultiLevelSkipListReader
     {
         private bool _currentFieldStoresPayloads;
-        private readonly IntIndexInputIndex[] _freqIndex;
-        private readonly IntIndexInputIndex[] _docIndex;
-        private readonly IntIndexInputIndex[] _posIndex;
+        private readonly IntIndexInput.AbstractIndex[] _freqIndex;
+        private readonly IntIndexInput.AbstractIndex[] _docIndex;
+        private readonly IntIndexInput.AbstractIndex[] _posIndex;
         private readonly long[] _payloadPointer;
         private readonly int[] _payloadLength;
 
-        private readonly IntIndexInputIndex _lastFreqIndex;
-        private readonly IntIndexInputIndex _lastDocIndex;
-        private readonly IntIndexInputIndex _lastPosIndex;
+        private readonly IntIndexInput.AbstractIndex _lastFreqIndex;
+        private readonly IntIndexInput.AbstractIndex _lastDocIndex;
+        private readonly IntIndexInput.AbstractIndex _lastPosIndex;
 
         private IndexOptions _indexOptions;
 
@@ -53,12 +53,12 @@ namespace Lucene.Net.Codecs.Sep
             : base(skipStream, maxSkipLevels, skipInterval)
         {
             if (freqIn != null)
-                _freqIndex = new IntIndexInputIndex[maxSkipLevels];
+                _freqIndex = new IntIndexInput.AbstractIndex[maxSkipLevels];
 
-            _docIndex = new IntIndexInputIndex[maxSkipLevels];
+            _docIndex = new IntIndexInput.AbstractIndex[maxSkipLevels];
 
             if (posIn != null)
-                _posIndex = new IntIndexInputIndex[m_maxNumberOfSkipLevels];
+                _posIndex = new IntIndexInput.AbstractIndex[m_maxNumberOfSkipLevels];
 
             for (var i = 0; i < maxSkipLevels; i++)
             {
@@ -85,8 +85,8 @@ namespace Lucene.Net.Codecs.Sep
             set { _indexOptions = value; }
         }
 
-        internal virtual void Init(long skipPointer, IntIndexInputIndex docBaseIndex, IntIndexInputIndex freqBaseIndex,
-            IntIndexInputIndex posBaseIndex, long payloadBasePointer, int df, bool storesPayloads)
+        internal virtual void Init(long skipPointer, IntIndexInput.AbstractIndex docBaseIndex, IntIndexInput.AbstractIndex freqBaseIndex,
+            IntIndexInput.AbstractIndex posBaseIndex, long payloadBasePointer, int df, bool storesPayloads)
         {
             base.Init(skipPointer, df);
             _currentFieldStoresPayloads = storesPayloads;
@@ -154,17 +154,17 @@ namespace Lucene.Net.Codecs.Sep
                 _posIndex[level - 1].CopyFrom(_posIndex[level]);
         }
 
-        internal virtual IntIndexInputIndex FreqIndex
+        internal virtual IntIndexInput.AbstractIndex FreqIndex
         {
             get { return _lastFreqIndex; }
         }
 
-        internal virtual IntIndexInputIndex PosIndex
+        internal virtual IntIndexInput.AbstractIndex PosIndex
         {
             get { return _lastPosIndex; }
         }
 
-        internal virtual IntIndexInputIndex DocIndex
+        internal virtual IntIndexInput.AbstractIndex DocIndex
         {
             get { return _lastDocIndex; }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c4fad82d/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
index 55f257a..d5affba 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Codecs.MockSep
                           MockSingleIntIndexOutput.VERSION_START);
         }
 
-        public override IntIndexInputReader GetReader()
+        public override AbstractReader GetReader()
         {
             return new MockReader((IndexInput)@in.Clone());
         }
@@ -53,7 +53,7 @@ namespace Lucene.Net.Codecs.MockSep
         /**
          * Just reads a vInt directly from the file.
          */
-        public class MockReader : IntIndexInputReader
+        public class MockReader : AbstractReader
         {
             // clone:
             internal readonly IndexInput @in;
@@ -71,7 +71,7 @@ namespace Lucene.Net.Codecs.MockSep
             }
         }
 
-        internal class MockSingleIntIndexInputIndex : IntIndexInputIndex
+        internal class MockSingleIntIndexInputIndex : AbstractIndex
         {
             private long fp;
 
@@ -87,12 +87,12 @@ namespace Lucene.Net.Codecs.MockSep
                 }
             }
 
-            public override void CopyFrom(IntIndexInputIndex other)
+            public override void CopyFrom(AbstractIndex other)
             {
                 fp = ((MockSingleIntIndexInputIndex)other).fp;
             }
 
-            public override void Seek(IntIndexInputReader other)
+            public override void Seek(AbstractReader other)
             {
                 ((MockReader)other).@in.Seek(fp);
             }
@@ -103,14 +103,14 @@ namespace Lucene.Net.Codecs.MockSep
             }
 
 
-            public override IntIndexInputIndex Clone()
+            public override AbstractIndex Clone()
             {
                 MockSingleIntIndexInputIndex other = new MockSingleIntIndexInputIndex();
                 other.fp = fp;
                 return other;
             }
         }
-        public override IntIndexInputIndex GetIndex()
+        public override AbstractIndex GetIndex()
         {
             return new MockSingleIntIndexInputIndex();
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c4fad82d/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
index aef9339..7d38c4d 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Codecs.IntBlock
             @out.Dispose();
 
             IntIndexInput @in = f.OpenInput(dir, "test", NewIOContext(Random()));
-            IntIndexInputReader r = @in.GetReader();
+            IntIndexInput.AbstractReader r = @in.GetReader();
 
             for (int i = 0; i < 11777; i++)
             {


[26/37] lucenenet git commit: Lucene.Net.Codecs: Removed unnecessary HashMapHelperClass

Posted by ni...@apache.org.
Lucene.Net.Codecs: Removed unnecessary HashMapHelperClass


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

Branch: refs/heads/api-work
Commit: e106720c52a0058e7ccf15b2ea98f8bdb71e9d1c
Parents: 87a256e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 16:54:27 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:26 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj  |   1 -
 .../SimpleText/SimpleTextDocValuesReader.cs     |   3 +-
 src/Lucene.Net.Codecs/StringHelperClass.cs      | 123 -------------------
 3 files changed, 2 insertions(+), 125 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e106720c/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
index aff960b..19e2f64 100644
--- a/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
+++ b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
@@ -117,7 +117,6 @@
     <Compile Include="SimpleText\SimpleTextTermVectorsReader.cs" />
     <Compile Include="SimpleText\SimpleTextTermVectorsWriter.cs" />
     <Compile Include="SimpleText\SimpleTextUtil.cs" />
-    <Compile Include="StringHelperClass.cs" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\Lucene.Net.Core\Lucene.Net.csproj">

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e106720c/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
index 027f436..8e03742 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextDocValuesReader.cs
@@ -42,6 +42,7 @@ namespace Lucene.Net.Codecs.SimpleText
     using BytesRef = Util.BytesRef;
     using StringHelper = Util.StringHelper;
     using System.Numerics;
+    using System.Text.RegularExpressions;
 
     public class SimpleTextDocValuesReader : DocValuesProducer // LUCENENET NOTE: Changed from internal to public because it is subclassed by a public class
     {
@@ -494,7 +495,7 @@ namespace Lucene.Net.Codecs.SimpleText
                             docID * (1 + _field.OrdPattern.Length));
                 SimpleTextUtil.ReadLine(_input, _scratch);
                 var ordList = _scratch.Utf8ToString().Trim();
-                _currentOrds = ordList.Length == 0 ? new string[0] : ordList.Split(",", true);
+                _currentOrds = ordList.Length == 0 ? new string[0] : ordList.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                 _currentIndex = 0;
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e106720c/src/Lucene.Net.Codecs/StringHelperClass.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/StringHelperClass.cs b/src/Lucene.Net.Codecs/StringHelperClass.cs
deleted file mode 100644
index 67505f3..0000000
--- a/src/Lucene.Net.Codecs/StringHelperClass.cs
+++ /dev/null
@@ -1,123 +0,0 @@
-\ufeff/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-//-------------------------------------------------------------------------------------------
-//	Copyright � 2007 - 2014 Tangible Software Solutions Inc.
-//	This class can be used by anyone provided that the copyright notice remains intact.
-//
-//	This class is used to convert some aspects of the Java String class.
-//-------------------------------------------------------------------------------------------
-
-using System.Runtime.InteropServices;
-
-namespace Lucene.Net.Codecs
-{
-
-
-    // LUCENENET TODO: Remove this class
-    internal static class StringHelperClass
-    {
-        //----------------------------------------------------------------------------------
-        //	This method replaces the Java String.substring method when 'start' is a
-        //	method call or calculated value to ensure that 'start' is obtained just once.
-        //----------------------------------------------------------------------------------
-        internal static string SubstringSpecial(this string self, int start, int end)
-        {
-            return self.Substring(start, end - start);
-        }
-
-        //------------------------------------------------------------------------------------
-        //	This method is used to replace calls to the 2-arg Java String.startsWith method.
-        //------------------------------------------------------------------------------------
-        internal static bool StartsWith(this string self, string prefix, int toffset)
-        {
-            return self.IndexOf(prefix, toffset, System.StringComparison.Ordinal) == toffset;
-        }
-
-        //------------------------------------------------------------------------------
-        //	This method is used to replace most calls to the Java String.split method.
-        //------------------------------------------------------------------------------
-        internal static string[] Split(this string self, string regexDelimiter, bool trimTrailingEmptyStrings)
-        {
-            string[] splitArray = System.Text.RegularExpressions.Regex.Split(self, regexDelimiter);
-
-            if (trimTrailingEmptyStrings)
-            {
-                if (splitArray.Length > 1)
-                {
-                    for (int i = splitArray.Length; i > 0; i--)
-                    {
-                        if (splitArray[i - 1].Length > 0)
-                        {
-                            if (i < splitArray.Length)
-                                System.Array.Resize(ref splitArray, i);
-
-                            break;
-                        }
-                    }
-                }
-            }
-
-            return splitArray;
-        }
-
-        #region These methods are used to replace calls to some Java String constructors.
-
-        internal static string NewString(sbyte[] bytes)
-        {
-            return NewString(bytes, 0, bytes.Length);
-        }
-
-        internal static string NewString(sbyte[] bytes, int index, int count)
-        {
-            return System.Text.Encoding.UTF8.GetString((byte[]) (object) bytes, index, count);
-        }
-
-        internal static string NewString(sbyte[] bytes, string encoding)
-        {
-            return NewString(bytes, 0, bytes.Length, encoding);
-        }
-
-        internal static string NewString(sbyte[] bytes, int index, int count, string encoding)
-        {
-            return System.Text.Encoding.GetEncoding(encoding).GetString((byte[]) (object) bytes, index, count);
-        }
-
-        #endregion
-
-        #region	These methods are used to replace calls to the Java String.getBytes methods.
-
-        internal static sbyte[] GetBytes(this string self)
-        {
-            return GetSBytesForEncoding(System.Text.Encoding.UTF8, self);
-        }
-
-        internal static sbyte[] GetBytes(this string self, string encoding)
-        {
-            return GetSBytesForEncoding(System.Text.Encoding.GetEncoding(encoding), self);
-        }
-
-        private static sbyte[] GetSBytesForEncoding(System.Text.Encoding encoding, string s)
-        {
-            var sbytes = new sbyte[encoding.GetByteCount(s)];
-            encoding.GetBytes(s, 0, s.Length, (byte[]) (object) sbytes, 0);
-            return sbytes;
-        }
-
-        #endregion
-    }
-}
\ No newline at end of file


[32/37] lucenenet git commit: Lucene.Net.Codecs refactor: Changed public fields to properties

Posted by ni...@apache.org.
Lucene.Net.Codecs refactor: Changed public fields to properties


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

Branch: refs/heads/api-work
Commit: 5a5c215dc7a8ca3f59b71f965f7a4d922a930e8b
Parents: c0908b4
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 17:50:33 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:50:33 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs        | 9 +++++++--
 .../Intblock/VariableIntBlockIndexInput.cs                  | 8 +++++++-
 2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5a5c215d/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
index f3b6846..a6d9bda 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
@@ -167,8 +167,13 @@ namespace Lucene.Net.Codecs.BlockTerms
 
         private class TermEntry
         {
-            public readonly BytesRef Term = new BytesRef();
-            public BlockTermState State;
+            public BytesRef Term { get; private set; }
+            public BlockTermState State { get; set; }
+
+            public TermEntry()
+            {
+                Term = new BytesRef();
+            }
         }
 
         internal class TermsWriter : TermsConsumer

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5a5c215d/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
index f6a1557..6607801 100644
--- a/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Intblock/VariableIntBlockIndexInput.cs
@@ -1,5 +1,6 @@
 \ufeffusing Lucene.Net.Codecs.Sep;
 using Lucene.Net.Store;
+using Lucene.Net.Support;
 using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.IntBlock
@@ -83,7 +84,12 @@ namespace Lucene.Net.Codecs.IntBlock
         {
             private readonly IndexInput input;
 
-            public readonly int[] pending;
+            [WritableArray]
+            public int[] Pending
+            {
+                get { return pending; }
+            }
+            private readonly int[] pending;
             private int upto;
 
             private bool seekPending;


[27/37] lucenenet git commit: Lucene.Net.Codecs.Pulsing.PulsingPostingsReader.IPulsingEnumAttribute refactor: Changed Enums() > Enums and changed return type from Dictionary > IDictionary

Posted by ni...@apache.org.
Lucene.Net.Codecs.Pulsing.PulsingPostingsReader.IPulsingEnumAttribute refactor: Changed Enums() > Enums and changed return type from Dictionary<PulsingPostingsReader, DocsEnum> > IDictionary<PulsingPostingsReader, DocsEnum>


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

Branch: refs/heads/api-work
Commit: e65864e45af06e07fb8694ce46459c971eccd169
Parents: fd57852
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 17:20:05 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:20:05 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e65864e4/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
index 1e24672..7f64fab 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
@@ -664,7 +664,7 @@ namespace Lucene.Net.Codecs.Pulsing
 
             var atts = de.Attributes;
             DocsEnum result;
-            atts.AddAttribute<IPulsingEnumAttribute>().Enums().TryGetValue(this, out result);
+            atts.AddAttribute<IPulsingEnumAttribute>().Enums.TryGetValue(this, out result);
             return result;
         }
 
@@ -675,7 +675,7 @@ namespace Lucene.Net.Codecs.Pulsing
         private DocsEnum SetOther(DocsEnum de, DocsEnum other)
         {
             var atts = de.Attributes;
-            return atts.AddAttribute<IPulsingEnumAttribute>().Enums()[this] = other;
+            return atts.AddAttribute<IPulsingEnumAttribute>().Enums[this] = other;
         }
 
         ///<summary>
@@ -687,7 +687,7 @@ namespace Lucene.Net.Codecs.Pulsing
         /// </summary>
         public interface IPulsingEnumAttribute : IAttribute
         {
-            Dictionary<PulsingPostingsReader, DocsEnum> Enums(); // LUCENENET TODO: Make property, change to IDictionary
+            IDictionary<PulsingPostingsReader, DocsEnum> Enums { get; }
         }
 
         /// <summary>
@@ -704,11 +704,11 @@ namespace Lucene.Net.Codecs.Pulsing
             // you don't reuse? and maybe pulsingPostingsReader should throw an exc if it wraps
             // another pulsing, because this is just stupid and wasteful. 
             // we still have to be careful in case someone does Pulsing(Stomping(Pulsing(...
-            private readonly Dictionary<PulsingPostingsReader, DocsEnum> _enums = new Dictionary<PulsingPostingsReader, DocsEnum>();
+            private readonly IDictionary<PulsingPostingsReader, DocsEnum> _enums = new Dictionary<PulsingPostingsReader, DocsEnum>();
 
-            public Dictionary<PulsingPostingsReader, DocsEnum> Enums()
+            public IDictionary<PulsingPostingsReader, DocsEnum> Enums
             {
-                return _enums;
+                get { return _enums; }
             }
             public override void Clear()
             {


[14/37] lucenenet git commit: Lucene.Net.Core.BlockTerms.FixedGapTermsIndexReader.FieldIndexData.CoreFieldIndex refactor: RamBytesUsed > RamBytesUsed()

Posted by ni...@apache.org.
Lucene.Net.Core.BlockTerms.FixedGapTermsIndexReader.FieldIndexData.CoreFieldIndex refactor: RamBytesUsed > RamBytesUsed()


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

Branch: refs/heads/api-work
Commit: 0ad5d6ffdb3714de31daf053aec7ea7ece22c7cb
Parents: f50b035
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 15:27:04 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 17:10:21 2017 +0700

----------------------------------------------------------------------
 .../BlockTerms/FixedGapTermsIndexReader.cs             | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ad5d6ff/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
index 01813cf..7a1750d 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
@@ -331,7 +331,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                         _numIndexTerms, outerInstance);
             }
 
-            internal class CoreFieldIndex
+            internal sealed class CoreFieldIndex
             {
                 /// <summary>
                 /// Where this fields term begin in the packed byte[] data
@@ -474,13 +474,10 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
 
                 /// <summary>Returns approximate RAM bytes Used</summary>
-                public long RamBytesUsed // LUCENENET TODO: Make RamBytesUsed()
+                public long RamBytesUsed()
                 {
-                    get
-                    {
-                        return ((TermOffsets != null) ? TermOffsets.RamBytesUsed() : 0) +
-                               ((TermsDictOffsets != null) ? TermsDictOffsets.RamBytesUsed() : 0);
-                    }
+                    return ((TermOffsets != null) ? TermOffsets.RamBytesUsed() : 0) +
+                            ((TermsDictOffsets != null) ? TermsDictOffsets.RamBytesUsed() : 0);
                 }
             }
         }
@@ -522,7 +519,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                                 ((_termBytesReader != null) ? _termBytesReader.RamBytesUsed() : 0);
 
             return _fields.Values.Aggregate(sizeInBytes,
-                (current, entry) => (current + entry.CoreIndex.RamBytesUsed));
+                (current, entry) => (current + entry.CoreIndex.RamBytesUsed()));
         }
     }
 }
\ No newline at end of file


[36/37] lucenenet git commit: Lucene.Net.Codecs: license headers and usings

Posted by ni...@apache.org.
Lucene.Net.Codecs: license headers and usings


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

Branch: refs/heads/api-work
Commit: 46743cc04b4f0a11b32b77db96435e73511c8c11
Parents: 0159ad2
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Jan 29 20:22:59 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Jan 29 20:22:59 2017 +0700

----------------------------------------------------------------------
 .../Appending/AppendingCodec.cs                 | 36 ++++----
 .../Appending/AppendingPostingsFormat.cs        | 38 ++++-----
 .../Appending/AppendingTermsReader.cs           | 38 ++++-----
 .../BlockTerms/BlockTermsReader.cs              | 45 +++++-----
 .../BlockTerms/BlockTermsWriter.cs              | 44 +++++-----
 .../BlockTerms/FixedGapTermsIndexReader.cs      | 48 +++++------
 .../BlockTerms/FixedGapTermsIndexWriter.cs      | 47 ++++++-----
 .../BlockTerms/TermsIndexReaderBase.cs          | 39 +++++----
 .../BlockTerms/TermsIndexWriterBase.cs          | 38 ++++-----
 .../BlockTerms/VariableGapTermsIndexReader.cs   | 51 ++++++------
 .../BlockTerms/VariableGapTermsIndexWriter.cs   | 50 ++++++------
 .../Bloom/BloomFilterFactory.cs                 | 35 ++++----
 .../Bloom/BloomFilteringPostingsFormat.cs       | 50 ++++++------
 .../Bloom/DefaultBloomFilterFactory.cs          | 34 ++++----
 src/Lucene.Net.Codecs/Bloom/FuzzySet.cs         | 43 +++++-----
 src/Lucene.Net.Codecs/Bloom/HashFunction.cs     | 34 ++++----
 src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs      | 36 ++++----
 .../DiskDV/DiskDocValuesFormat.cs               | 43 +++++-----
 .../DiskDV/DiskDocValuesProducer.cs             | 42 +++++-----
 src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs | 39 ++++-----
 .../Memory/DirectDocValuesConsumer.cs           | 45 +++++-----
 .../Memory/DirectDocValuesFormat.cs             | 37 ++++-----
 .../Memory/DirectDocValuesProducer.cs           |  8 +-
 .../Memory/DirectPostingsFormat.cs              | 63 +++++++-------
 .../Memory/FSTOrdPostingsFormat.cs              | 36 ++++----
 .../Memory/FSTOrdPulsing41PostingsFormat.cs     | 36 ++++----
 .../Memory/FSTOrdTermsReader.cs                 | 56 ++++++-------
 .../Memory/FSTOrdTermsWriter.cs                 | 54 ++++++------
 .../Memory/FSTPostingsFormat.cs                 | 35 ++++----
 .../Memory/FSTPulsing41PostingsFormat.cs        | 37 ++++-----
 src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs  | 44 +++++-----
 src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs  | 43 +++++-----
 src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs  | 51 ++++++------
 .../Memory/MemoryDocValuesConsumer.cs           | 46 +++++------
 .../Memory/MemoryDocValuesFormat.cs             | 35 ++++----
 .../Memory/MemoryDocValuesProducer.cs           | 44 +++++-----
 .../Memory/MemoryPostingsFormat.cs              | 71 ++++++++--------
 .../Pulsing/Pulsing41PostingsFormat.cs          | 34 ++++----
 .../Pulsing/PulsingPostingsFormat.cs            | 39 +++++----
 .../Pulsing/PulsingPostingsReader.cs            | 46 +++++------
 .../Pulsing/PulsingPostingsWriter.cs            | 43 +++++-----
 src/Lucene.Net.Codecs/Sep/IntIndexInput.cs      | 36 ++++----
 src/Lucene.Net.Codecs/Sep/IntIndexOutput.cs     | 36 ++++----
 src/Lucene.Net.Codecs/Sep/IntStreamFactory.cs   | 35 ++++----
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs  | 41 +++++-----
 src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs  | 40 ++++-----
 src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs  | 40 ++++-----
 src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs  | 40 ++++-----
 .../SimpleText/SimpleTextCodec.cs               | 35 ++++----
 .../SimpleText/SimpleTextDocValuesFormat.cs     | 37 ++++-----
 .../SimpleText/SimpleTextDocValuesReader.cs     | 59 +++++++-------
 .../SimpleText/SimpleTextDocValuesWriter.cs     | 51 ++++++------
 .../SimpleText/SimpleTextFieldInfosFormat.cs    | 35 ++++----
 .../SimpleText/SimpleTextFieldInfosReader.cs    | 49 ++++++-----
 .../SimpleText/SimpleTextFieldInfosWriter.cs    | 48 ++++++-----
 .../SimpleText/SimpleTextFieldsReader.cs        | 76 ++++++++---------
 .../SimpleText/SimpleTextFieldsWriter.cs        | 36 ++++----
 .../SimpleText/SimpleTextLiveDocsFormat.cs      | 75 +++++++++--------
 .../SimpleText/SimpleTextNormsFormat.cs         | 35 ++++----
 .../SimpleText/SimpleTextPostingsFormat.cs      | 37 ++++-----
 .../SimpleText/SimpleTextSegmentInfoFormat.cs   | 35 ++++----
 .../SimpleText/SimpleTextSegmentInfoReader.cs   | 50 ++++++------
 .../SimpleText/SimpleTextSegmentInfoWriter.cs   | 44 +++++-----
 .../SimpleText/SimpleTextStoredFieldsFormat.cs  | 35 ++++----
 .../SimpleText/SimpleTextStoredFieldsReader.cs  | 76 +++++++++--------
 .../SimpleText/SimpleTextStoredFieldsWriter.cs  | 57 +++++++------
 .../SimpleText/SimpleTextTermVectorsFormat.cs   | 36 ++++----
 .../SimpleText/SimpleTextTermVectorsReader.cs   | 86 ++++++++++----------
 .../SimpleText/SimpleTextTermVectorsWriter.cs   | 46 +++++------
 .../SimpleText/SimpleTextUtil.cs                | 33 ++++----
 src/Lucene.Net.Core/Util/Fst/Util.cs            |  2 +-
 71 files changed, 1498 insertions(+), 1576 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Appending/AppendingCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Appending/AppendingCodec.cs b/src/Lucene.Net.Codecs/Appending/AppendingCodec.cs
index 3b87595..cb690ab 100644
--- a/src/Lucene.Net.Codecs/Appending/AppendingCodec.cs
+++ b/src/Lucene.Net.Codecs/Appending/AppendingCodec.cs
@@ -1,24 +1,24 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing System;
+using Lucene.Net.Codecs.Lucene40;
 
 namespace Lucene.Net.Codecs.Appending
 {
-    using System;
-    using Lucene40;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// This codec uses an index format that is very similar to Lucene40Codec 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Appending/AppendingPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Appending/AppendingPostingsFormat.cs b/src/Lucene.Net.Codecs/Appending/AppendingPostingsFormat.cs
index d15d75c..f937595 100644
--- a/src/Lucene.Net.Codecs/Appending/AppendingPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Appending/AppendingPostingsFormat.cs
@@ -1,25 +1,25 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Codecs.Lucene40;
+using Lucene.Net.Index;
+using System;
 
 namespace Lucene.Net.Codecs.Appending
 {
-    using System;
-    using Lucene40;
-    using Index;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Appending Postigns Implementation

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs b/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
index 3929f83..1b01fea 100644
--- a/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
@@ -1,25 +1,25 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Store;
+using System;
 
 namespace Lucene.Net.Codecs.Appending
 {
-    using System;
-    using Index;
-    using Store;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Reads append-only terms from AppendingTermsWriter.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
index e427beb..8a0bf2b 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
@@ -1,30 +1,29 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.BlockTerms
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using System;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using Index;
-    using Store;
-    using Util;
-    
     /// <summary>
     /// Handles a terms dict, but decouples all details of
     /// doc/freqs/positions reading to an instance of {@link

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
index a6d9bda..d95aa57 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
@@ -1,28 +1,28 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.BlockTerms
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using Index;
-    using Store;
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Writes terms dict, block-encoding (column stride) each term's metadata 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
index 8fa852f..534c9d0 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
@@ -1,30 +1,30 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using Lucene.Net.Util.Packed;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
 
 namespace Lucene.Net.Codecs.BlockTerms
 {
-    using System;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using System.Linq;
-    using Index;
-    using Store;
-    using Util;
-    using Util.Packed;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// TermsIndexReader for simple every Nth terms indexes

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
index b202a57..4339316 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
@@ -1,30 +1,29 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHoutput WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using Lucene.Net.Util.Packed;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.BlockTerms
 {
-
-    using System;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using Index;
-    using Store;
-    using Util;
-    using Util.Packed;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Selects every Nth term as and index term, and hold term

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
index 76ee43c..6323e7e 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexReaderBase.cs
@@ -1,26 +1,25 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
+using Lucene.Net.Util;
+using System;
 
 namespace Lucene.Net.Codecs.BlockTerms
 {
-
-    using System;
-    using Index;
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// TODO

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/BlockTerms/TermsIndexWriterBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexWriterBase.cs b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexWriterBase.cs
index e3efbcd..7613f23 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/TermsIndexWriterBase.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/TermsIndexWriterBase.cs
@@ -1,25 +1,25 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
+using Lucene.Net.Util;
+using System;
 
 namespace Lucene.Net.Codecs.BlockTerms
 {
-    using System;
-    using Index;
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     ///  Base class for terms index implementations to plug

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
index 35b0dc4..bbcaac5 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
@@ -1,32 +1,31 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using Lucene.Net.Util.Fst;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
 
 namespace Lucene.Net.Codecs.BlockTerms
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using System;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using System.Linq;
-    using Index;
-    using Store;
-    using Util;
-    using Util.Fst;
-    
     /// <summary>
     /// See VariableGapTermsIndexWriter
     /// 
@@ -219,7 +218,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                     {
                         if (count == outerInstance._indexDivisor)
                         {
-                            builder.Add(Util.ToIntsRef(result.Input, scratchIntsRef), result.Output);
+                            builder.Add(Util.Fst.Util.ToIntsRef(result.Input, scratchIntsRef), result.Output);
                             count = 0;
                         }
                         count++;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
index 296dc20..9b8ebae 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
@@ -1,32 +1,30 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using Lucene.Net.Util.Fst;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.BlockTerms
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using System;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using Codecs;
-    using Index;
-    using Store;
-    using Util;
-    using Util.Fst;
-    
     /// <summary>
     /// Selects index terms according to provided pluggable
     /// {@link IndexTermSelector}, and stores them in a prefix trie that's
@@ -286,7 +284,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                 text.Length = outerInstance.IndexedTermPrefixLength(_lastTerm, text);
                 try
                 {
-                    _fstBuilder.Add(Util.ToIntsRef(text, _scratchIntsRef), termsFilePointer);
+                    _fstBuilder.Add(Util.Fst.Util.ToIntsRef(text, _scratchIntsRef), termsFilePointer);
                 }
                 finally
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Bloom/BloomFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilterFactory.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilterFactory.cs
index 4dab212..377806c 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilterFactory.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilterFactory.cs
@@ -1,24 +1,23 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
 
 namespace Lucene.Net.Codecs.Bloom
 {
-
-    using Index;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Class used to create index-time {@link FuzzySet} appropriately configured for

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
index 6ef2c7a..cfdcb6b 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -1,33 +1,31 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Support;
+using Lucene.Net.Util;
+using Lucene.Net.Util.Automaton;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 
 namespace Lucene.Net.Codecs.Bloom
 {
-
-    using System;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using Index;
-    using Store;
-    using Support;
-    using Util;
-    using Util.Automaton;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Bloom/DefaultBloomFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/DefaultBloomFilterFactory.cs b/src/Lucene.Net.Codecs/Bloom/DefaultBloomFilterFactory.cs
index f3e0722..0b2e1ad 100644
--- a/src/Lucene.Net.Codecs/Bloom/DefaultBloomFilterFactory.cs
+++ b/src/Lucene.Net.Codecs/Bloom/DefaultBloomFilterFactory.cs
@@ -1,23 +1,23 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Index;
 
 namespace Lucene.Net.Codecs.Bloom
 {
-    using Index;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Default policy is to allocate a bitset with 10% saturation given a unique term per document.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs b/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
index d3ac42b..df87f20 100644
--- a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
+++ b/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
@@ -1,28 +1,27 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Store;
+using Lucene.Net.Util;
+using System;
+using System.Diagnostics;
+using System.Linq;
 
 namespace Lucene.Net.Codecs.Bloom
 {
-
-    using System;
-    using System.Diagnostics;
-    using System.Linq;
-    using Store;
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// A class used to represent a set of many, potentially large, values (e.g. many

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Bloom/HashFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/HashFunction.cs b/src/Lucene.Net.Codecs/Bloom/HashFunction.cs
index facee5b..9be4889 100644
--- a/src/Lucene.Net.Codecs/Bloom/HashFunction.cs
+++ b/src/Lucene.Net.Codecs/Bloom/HashFunction.cs
@@ -1,23 +1,23 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Util;
 
 namespace Lucene.Net.Codecs.Bloom
 {
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Base class for hashing functions that can be referred to by name.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs b/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
index 9992971..83504fc 100644
--- a/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
+++ b/src/Lucene.Net.Codecs/Bloom/MurmurHash2.cs
@@ -1,25 +1,23 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Util;
 
 namespace Lucene.Net.Codecs.Bloom
 {
-
-    using System;
-    using Util;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// This is a very fast, non-cryptographic hash suitable for general hash-based

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
index 758a413..cf4a000 100644
--- a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
+++ b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesFormat.cs
@@ -1,29 +1,26 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+using Lucene.Net.Codecs.Lucene45;
+using Lucene.Net.Index;
+using Lucene.Net.Util;
+using System.Collections.Generic;
 
 namespace Lucene.Net.Codecs.DiskDV
 {
-    using Codecs;
-    using Lucene45;
-    using Index;
-    using System;
-    using Util;
-    using System.Collections.Generic;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// DocValues format that keeps most things on disk.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
index 605cfa0..6fc81d1 100644
--- a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
@@ -1,27 +1,27 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Codecs.Lucene45;
+using Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Util.Packed;
+using System;
 
 namespace Lucene.Net.Codecs.DiskDV
 {
-    using System;
-    using Lucene45;
-    using Index;
-    using Store;
-    using Util.Packed;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     internal class DiskDocValuesProducer : Lucene45DocValuesProducer
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs b/src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs
index 4284b18..4ba4e5e 100644
--- a/src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs
+++ b/src/Lucene.Net.Codecs/DiskDV/DiskNormsFormat.cs
@@ -1,27 +1,24 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+using Lucene.Net.Codecs.Lucene45;
+using Lucene.Net.Index;
 
 namespace Lucene.Net.Codecs.DiskDV
 {
-
-    using System;
-    using Codecs;
-    using Lucene45;
-    using Index;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// Norms format that keeps all norms on disk

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
index b19e988..a6addd3 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
@@ -1,34 +1,33 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Memory
 {
-    using System;
-    using System.Diagnostics;
-    using System.Collections.Generic;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
+    using BytesRef = Util.BytesRef;
     using FieldInfo = Index.FieldInfo;
     using IndexFileNames = Index.IndexFileNames;
-    using SegmentWriteState = Index.SegmentWriteState;
     using IndexOutput = Store.IndexOutput;
-    using BytesRef = Util.BytesRef;
     using IOUtils = Util.IOUtils;
-    using System.Collections;
-
+    using SegmentWriteState = Index.SegmentWriteState;
 
     /// <summary>
     /// Writer for <seealso cref="DirectDocValuesFormat"/>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/DirectDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesFormat.cs
index 2bf48cb..57a9fc3 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesFormat.cs
@@ -1,24 +1,23 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Memory
+\ufeffnamespace Lucene.Net.Codecs.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-	using SegmentReadState = Index.SegmentReadState;
+    using SegmentReadState = Index.SegmentReadState;
 	using SegmentWriteState = Index.SegmentWriteState;
 	using ArrayUtil = Util.ArrayUtil;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
index 49ec998..1fdb2ee 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
@@ -1,14 +1,13 @@
-\ufeffusing System.Diagnostics;
-using System.Collections.Generic;
-using Lucene.Net.Index;
+\ufeffusing Lucene.Net.Index;
 using Lucene.Net.Store;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Memory
 {
-
     /*
 	 * Licensed to the Apache Software Foundation (ASF) under one or more
 	 * contributor license agreements.  See the NOTICE file distributed with
@@ -29,7 +28,6 @@ namespace Lucene.Net.Codecs.Memory
     /// <summary>
     /// TextReader for <seealso cref="DirectDocValuesFormat"/>
     /// </summary>
-
     internal class DirectDocValuesProducer : DocValuesProducer
     {
         // metadata maps (just file pointers and minimal stuff)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
index 347891c..e6f1fce 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs
@@ -1,50 +1,47 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Lucene.Net.Support;
+\ufeffusing Lucene.Net.Support;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 
 namespace Lucene.Net.Codecs.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using System;
-    using System.Diagnostics;
-    using System.Collections.Generic;
-
-    using Lucene41PostingsFormat = Lucene41.Lucene41PostingsFormat;
+    using ArrayUtil = Util.ArrayUtil;
+    using BytesRef = Util.BytesRef;
+    using CompiledAutomaton = Util.Automaton.CompiledAutomaton;
     using DocsAndPositionsEnum = Index.DocsAndPositionsEnum;
     using DocsEnum = Index.DocsEnum;
-    using IndexOptions = Index.IndexOptions;
     using FieldInfo = Index.FieldInfo;
     using Fields = Index.Fields;
+    using IBits = Util.IBits;
+    using IndexOptions = Index.IndexOptions;
+    using IOContext = Store.IOContext;
     using OrdTermState = Index.OrdTermState;
+    using RAMOutputStream = Store.RAMOutputStream;
+    using RamUsageEstimator = Util.RamUsageEstimator;
+    using RunAutomaton = Util.Automaton.RunAutomaton;
     using SegmentReadState = Index.SegmentReadState;
     using SegmentWriteState = Index.SegmentWriteState;
-    using TermState = Index.TermState;
     using Terms = Index.Terms;
     using TermsEnum = Index.TermsEnum;
-    using IOContext = Store.IOContext;
-    using RAMOutputStream = Store.RAMOutputStream;
-    using ArrayUtil = Util.ArrayUtil;
-    using IBits = Util.IBits;
-    using BytesRef = Util.BytesRef;
-    using RamUsageEstimator = Util.RamUsageEstimator;
-    using CompiledAutomaton = Util.Automaton.CompiledAutomaton;
-    using RunAutomaton = Util.Automaton.RunAutomaton;
+    using TermState = Index.TermState;
     using Transition = Util.Automaton.Transition;
 
     // TODO: 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/FSTOrdPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdPostingsFormat.cs
index 89ae246..dc8725f 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdPostingsFormat.cs
@@ -1,22 +1,22 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Memory
+\ufeffnamespace Lucene.Net.Codecs.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
     using Lucene41PostingsWriter = Lucene41.Lucene41PostingsWriter;
     using Lucene41PostingsReader = Lucene41.Lucene41PostingsReader;
     using SegmentReadState = Index.SegmentReadState;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/FSTOrdPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdPulsing41PostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdPulsing41PostingsFormat.cs
index 1fa3bc4..7447d02 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdPulsing41PostingsFormat.cs
@@ -1,22 +1,22 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Memory
+\ufeffnamespace Lucene.Net.Codecs.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
     using Lucene41PostingsBaseFormat = Lucene41.Lucene41PostingsBaseFormat;
     using PulsingPostingsWriter = Pulsing.PulsingPostingsWriter;
     using PulsingPostingsReader = Pulsing.PulsingPostingsReader;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
index 8bab5ef..627c3d0 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
@@ -1,34 +1,32 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing Lucene.Net.Index;
+using Lucene.Net.Store;
+using Lucene.Net.Support;
+using Lucene.Net.Util;
+using Lucene.Net.Util.Automaton;
+using Lucene.Net.Util.Fst;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
 
 namespace Lucene.Net.Codecs.Memory
 {
-
-    using System;
-    using System.Diagnostics;
-    using System.Collections;
-    using System.Collections.Generic;
-    using System.Linq;
-    using Lucene.Net.Index;
-    using Lucene.Net.Store;
-    using Lucene.Net.Support;
-    using Lucene.Net.Util;
-    using Lucene.Net.Util.Automaton;
-    using Lucene.Net.Util.Fst;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     /// <summary>
     /// FST-based terms dictionary reader.
@@ -855,7 +853,7 @@ namespace Lucene.Net.Codecs.Memory
                 private Frame LoadCeilFrame(int label, Frame top, Frame frame)
                 {
                     var arc = frame.arc;
-                    arc = Util.ReadCeilArc(label, fst, top.arc, arc, fstReader);
+                    arc = Util.Fst.Util.ReadCeilArc(label, fst, top.arc, arc, fstReader);
                     if (arc == null)
                     {
                         return null;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/FSTOrdTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsWriter.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsWriter.cs
index 77bf2a6..9299b55 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsWriter.cs
@@ -1,42 +1,39 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+\ufeffusing Lucene.Net.Util.Fst;
+using System;
+using System.Collections.Generic;
 using System.IO;
-using Lucene.Net.Util.Fst;
 
 namespace Lucene.Net.Codecs.Memory
 {
-    using System;
-    using System.Collections.Generic;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using IndexOptions = Index.IndexOptions;
+    using BytesRef = Util.BytesRef;
     using FieldInfo = Index.FieldInfo;
     using FieldInfos = Index.FieldInfos;
+    using FST = FST;
     using IndexFileNames = Index.IndexFileNames;
-    using SegmentWriteState = Index.SegmentWriteState;
-    using DataOutput = Store.DataOutput;
+    using IndexOptions = Index.IndexOptions;
     using IndexOutput = Store.IndexOutput;
-    using RAMOutputStream = Store.RAMOutputStream;
-    using BytesRef = Util.BytesRef;
-    using IOUtils = Util.IOUtils;
     using IntsRef = Util.IntsRef;
-    using Builder = Util.Fst.Builder<long>;
-    using FST = FST;
+    using IOUtils = Util.IOUtils;
     using PositiveIntOutputs = Util.Fst.PositiveIntOutputs;
+    using RAMOutputStream = Store.RAMOutputStream;
+    using SegmentWriteState = Index.SegmentWriteState;
     using Util = Util.Fst.Util;
 
     /// <summary>
@@ -138,7 +135,6 @@ namespace Lucene.Net.Codecs.Memory
     /// 
     /// @lucene.experimental 
     /// </summary>
-
     public class FSTOrdTermsWriter : FieldsConsumer
     {
         internal const string TERMS_INDEX_EXTENSION = "tix";

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/FSTPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/FSTPostingsFormat.cs
index a552fe9..3327f6e 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTPostingsFormat.cs
@@ -1,22 +1,21 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Memory
+\ufeffnamespace Lucene.Net.Codecs.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
     using Lucene41PostingsWriter = Lucene41.Lucene41PostingsWriter;
     using Lucene41PostingsReader = Lucene41.Lucene41PostingsReader;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/FSTPulsing41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTPulsing41PostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/FSTPulsing41PostingsFormat.cs
index 7f285fd..f18be31 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTPulsing41PostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTPulsing41PostingsFormat.cs
@@ -1,23 +1,22 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Lucene.Net.Codecs.Memory
+\ufeffnamespace Lucene.Net.Codecs.Memory
 {
-    
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
     using Lucene41PostingsBaseFormat = Lucene41.Lucene41PostingsBaseFormat;
     using PulsingPostingsWriter = Pulsing.PulsingPostingsWriter;
     using PulsingPostingsReader = Pulsing.PulsingPostingsReader;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs b/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
index 34a45d8..376896b 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs
@@ -1,33 +1,31 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+\ufeffusing Lucene.Net.Support;
+using System.Diagnostics;
 using System.Linq;
 
 namespace Lucene.Net.Codecs.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
 
-    using System.Diagnostics;
-    using Support;
-
-    using FieldInfo = Index.FieldInfo;
-    using IndexOptions = Index.IndexOptions;
     using DataInput = Store.DataInput;
     using DataOutput = Store.DataOutput;
-   
+    using FieldInfo = Index.FieldInfo;
+    using IndexOptions = Index.IndexOptions;
+
     /// <summary>
     /// An FST implementation for 
     /// <seealso cref="FSTTermsWriter"/>.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46743cc0/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
index 9b68452..2e77f4b 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
@@ -1,29 +1,30 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+\ufeffusing System;
+    using System.Collections;
+    using System.Collections.Generic;
+    using System.Diagnostics;
+    using Lucene.Net.Util.Fst;
 
 using Lucene.Net.Support;
 
 namespace Lucene.Net.Codecs.Memory
 {
-    using System;
-    using System.Collections;
-    using System.Collections.Generic;
-    using System.Diagnostics;
-    using Util.Fst;
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
     using ArrayUtil = Util.ArrayUtil;
     using IBits = Util.IBits;
     using ByteArrayDataInput = Store.ByteArrayDataInput;