lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [03/37] lucenenet git commit: Lucene.Net.Codecs: member accessibility
Date Sun, 29 Jan 2017 13:27:25 GMT
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)
         {
         }
     }


Mime
View raw message