lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [13/37] lucenenet git commit: Lucene.Net.Codecs: Renamed fields from UPPER_CASE to camelCase
Date Sun, 29 Jan 2017 13:27:35 GMT
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 <shad@shadstorhaug.com>
Authored: Sun Jan 29 15:24:11 2017 +0700
Committer: Shad Storhaug <shad@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;
             }
 


Mime
View raw message