lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [15/22] lucenenet git commit: Lucene.Net.Queries refactor: renamed protected fields camelCase prefixed with m_
Date Sat, 28 Jan 2017 10:15:58 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/ReciprocalFloatFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/ReciprocalFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/ReciprocalFloatFunction.cs
index 33ae99f..bc6d799 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/ReciprocalFloatFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/ReciprocalFloatFunction.cs
@@ -47,25 +47,25 @@ namespace Lucene.Net.Queries.Function.ValueSources
     ///  </seealso>
     public class ReciprocalFloatFunction : ValueSource
     {
-        protected readonly ValueSource source;
-        protected readonly float m;
-        protected readonly float a;
-        protected readonly float b;
+        protected readonly ValueSource m_source;
+        protected readonly float m_m;
+        protected readonly float m_a;
+        protected readonly float m_b;
 
         /// <summary>
         ///  f(source) = a/(m*float(source)+b)
         /// </summary>
         public ReciprocalFloatFunction(ValueSource source, float m, float a, float b)
         {
-            this.source = source;
-            this.m = m;
-            this.a = a;
-            this.b = b;
+            this.m_source = source;
+            this.m_m = m;
+            this.m_a = a;
+            this.m_b = b;
         }
 
         public override FunctionValues GetValues(IDictionary context, AtomicReaderContext
readerContext)
         {
-            var vals = source.GetValues(context, readerContext);
+            var vals = m_source.GetValues(context, readerContext);
             return new FloatDocValuesAnonymousInnerClassHelper(this, this, vals);
         }
 
@@ -83,29 +83,29 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
             public override float FloatVal(int doc)
             {
-                return outerInstance.a / (outerInstance.m * vals.FloatVal(doc) + outerInstance.b);
+                return outerInstance.m_a / (outerInstance.m_m * vals.FloatVal(doc) + outerInstance.m_b);
             }
             public override string ToString(int doc)
             {
-                return Convert.ToString(outerInstance.a) + "/(" + outerInstance.m + "*float("
+ vals.ToString(doc) + ')' + '+' + outerInstance.b + ')';
+                return Convert.ToString(outerInstance.m_a) + "/(" + outerInstance.m_m + "*float("
+ vals.ToString(doc) + ')' + '+' + outerInstance.m_b + ')';
             }
         }
 
         public override void CreateWeight(IDictionary context, IndexSearcher searcher)
         {
-            source.CreateWeight(context, searcher);
+            m_source.CreateWeight(context, searcher);
         }
 
         public override string GetDescription()
         {
-            return Convert.ToString(a) + "/(" + m + "*float(" + source.GetDescription() +
")" + "+" + b + ')';
+            return Convert.ToString(m_a) + "/(" + m_m + "*float(" + m_source.GetDescription()
+ ")" + "+" + m_b + ')';
         }
 
         public override int GetHashCode()
         {
-            int h = Number.FloatToIntBits(a) + Number.FloatToIntBits(m);
+            int h = Number.FloatToIntBits(m_a) + Number.FloatToIntBits(m_m);
             h ^= (h << 13) | ((int)((uint)h >> 20));
-            return h + (Number.FloatToIntBits(b)) + source.GetHashCode();
+            return h + (Number.FloatToIntBits(m_b)) + m_source.GetHashCode();
         }
 
         public override bool Equals(object o)
@@ -117,7 +117,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
             var other = o as ReciprocalFloatFunction;
             if (other == null)
                 return false;
-            return this.m == other.m && this.a == other.a && this.b == other.b
&& this.source.Equals(other.source);
+            return this.m_m == other.m_m && this.m_a == other.m_a && this.m_b
== other.m_b && this.m_source.Equals(other.m_source);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
index 4953c60..deaf177 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/ScaleFloatFunction.cs
@@ -38,20 +38,20 @@ namespace Lucene.Net.Queries.Function.ValueSources
     /// </summary>
     public class ScaleFloatFunction : ValueSource
     {
-        protected readonly ValueSource source;
-        protected readonly float min;
-        protected readonly float max;
+        protected readonly ValueSource m_source;
+        protected readonly float m_min;
+        protected readonly float m_max;
 
         public ScaleFloatFunction(ValueSource source, float min, float max)
         {
-            this.source = source;
-            this.min = min;
-            this.max = max;
+            this.m_source = source;
+            this.m_min = min;
+            this.m_max = max;
         }
 
         public override string GetDescription()
         {
-            return "scale(" + source.GetDescription() + "," + min + "," + max + ")";
+            return "scale(" + m_source.GetDescription() + "," + m_min + "," + m_max + ")";
         }
 
         private class ScaleInfo
@@ -70,7 +70,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
             foreach (AtomicReaderContext leaf in leaves)
             {
                 int maxDoc = leaf.Reader.MaxDoc;
-                FunctionValues vals = source.GetValues(context, leaf);
+                FunctionValues vals = m_source.GetValues(context, leaf);
                 for (int i = 0; i < maxDoc; i++)
                 {
 
@@ -112,11 +112,11 @@ namespace Lucene.Net.Queries.Function.ValueSources
                 scaleInfo = CreateScaleInfo(context, readerContext);
             }
 
-            float scale = (scaleInfo.MaxVal - scaleInfo.MinVal == 0) ? 0 : (max - min) /
(scaleInfo.MaxVal - scaleInfo.MinVal);
+            float scale = (scaleInfo.MaxVal - scaleInfo.MinVal == 0) ? 0 : (m_max - m_min)
/ (scaleInfo.MaxVal - scaleInfo.MinVal);
             float minSource = scaleInfo.MinVal;
             float maxSource = scaleInfo.MaxVal;
 
-            var vals = source.GetValues(context, readerContext);
+            var vals = m_source.GetValues(context, readerContext);
             return new FloatDocValuesAnonymousInnerClassHelper(this, this, scale, minSource,
maxSource, vals);
         }
 
@@ -141,26 +141,26 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
             public override float FloatVal(int doc)
             {
-                return (vals.FloatVal(doc) - minSource) * scale + outerInstance.min;
+                return (vals.FloatVal(doc) - minSource) * scale + outerInstance.m_min;
             }
             public override string ToString(int doc)
             {
-                return "scale(" + vals.ToString(doc) + ",toMin=" + outerInstance.min + ",toMax="
+ outerInstance.max + ",fromMin=" + minSource + ",fromMax=" + maxSource + ")";
+                return "scale(" + vals.ToString(doc) + ",toMin=" + outerInstance.m_min +
",toMax=" + outerInstance.m_max + ",fromMin=" + minSource + ",fromMax=" + maxSource + ")";
             }
         }
 
         public override void CreateWeight(IDictionary context, IndexSearcher searcher)
         {
-            source.CreateWeight(context, searcher);
+            m_source.CreateWeight(context, searcher);
         }
 
         public override int GetHashCode()
         {
-            int h = Number.FloatToIntBits(min);
+            int h = Number.FloatToIntBits(m_min);
             h = h * 29;
-            h += Number.FloatToIntBits(max);
+            h += Number.FloatToIntBits(m_max);
             h = h * 29;
-            h += source.GetHashCode();
+            h += m_source.GetHashCode();
             return h;
         }
 
@@ -169,9 +169,9 @@ namespace Lucene.Net.Queries.Function.ValueSources
             var other = o as ScaleFloatFunction;
             if (other == null)
                 return false;
-            return this.min == other.min 
-                && this.max == other.max 
-                && this.source.Equals(other.source);
+            return this.m_min == other.m_min 
+                && this.m_max == other.m_max 
+                && this.m_source.Equals(other.m_source);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/ShortFieldSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/ShortFieldSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/ShortFieldSource.cs
index d0cfcbe..6398604 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/ShortFieldSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/ShortFieldSource.cs
@@ -46,12 +46,12 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         public override string GetDescription()
         {
-            return "short(" + field + ')';
+            return "short(" + m_field + ')';
         }
 
         public override FunctionValues GetValues(IDictionary context, AtomicReaderContext
readerContext)
         {
-            var arr = cache.GetShorts(readerContext.AtomicReader, field, parser, false);
+            var arr = m_cache.GetShorts(readerContext.AtomicReader, m_field, parser, false);
             return new FunctionValuesAnonymousInnerClassHelper(this, arr);
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/SimpleBoolFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/SimpleBoolFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/SimpleBoolFunction.cs
index 2944437..e13cad3 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/SimpleBoolFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/SimpleBoolFunction.cs
@@ -31,11 +31,11 @@ namespace Lucene.Net.Queries.Function.ValueSources
     /// </summary>
     public abstract class SimpleBoolFunction : BoolFunction
     {
-        protected readonly ValueSource source;
+        protected readonly ValueSource m_source;
 
         public SimpleBoolFunction(ValueSource source)
         {
-            this.source = source;
+            this.m_source = source;
         }
 
         protected abstract string Name { get; }
@@ -44,7 +44,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         public override FunctionValues GetValues(IDictionary context, AtomicReaderContext
readerContext)
         {
-            FunctionValues vals = source.GetValues(context, readerContext);
+            FunctionValues vals = m_source.GetValues(context, readerContext);
             return new BoolDocValuesAnonymousInnerClassHelper(this, this, vals);
         }
 
@@ -73,12 +73,12 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         public override string GetDescription()
         {
-            return Name + '(' + source.GetDescription() + ')';
+            return Name + '(' + m_source.GetDescription() + ')';
         }
 
         public override int GetHashCode()
         {
-            return source.GetHashCode() + Name.GetHashCode();
+            return m_source.GetHashCode() + Name.GetHashCode();
         }
 
         public override bool Equals(object o)
@@ -86,12 +86,12 @@ namespace Lucene.Net.Queries.Function.ValueSources
             var other = o as SimpleBoolFunction;
             if (other == null)
                 return false;
-            return this.source.Equals(other.source);
+            return this.m_source.Equals(other.m_source);
         }
 
         public override void CreateWeight(IDictionary context, IndexSearcher searcher)
         {
-            source.CreateWeight(context, searcher);
+            m_source.CreateWeight(context, searcher);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/SimpleFloatFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/SimpleFloatFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/SimpleFloatFunction.cs
index b0171ed..f421011 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/SimpleFloatFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/SimpleFloatFunction.cs
@@ -35,7 +35,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         public override FunctionValues GetValues(IDictionary context, AtomicReaderContext
readerContext)
         {
-            FunctionValues vals = source.GetValues(context, readerContext);
+            FunctionValues vals = m_source.GetValues(context, readerContext);
             return new FloatDocValuesAnonymousInnerClassHelper(this, this, vals);
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/SingleFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/SingleFunction.cs b/src/Lucene.Net.Queries/Function/ValueSources/SingleFunction.cs
index c9d4633..2384fff 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/SingleFunction.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/SingleFunction.cs
@@ -25,23 +25,23 @@ namespace Lucene.Net.Queries.Function.ValueSources
     /// </summary>
     public abstract class SingleFunction : ValueSource
     {
-        protected readonly ValueSource source;
+        protected readonly ValueSource m_source;
 
         public SingleFunction(ValueSource source)
         {
-            this.source = source;
+            this.m_source = source;
         }
 
         protected abstract string Name { get; }
 
         public override string GetDescription()
         {
-            return Name + '(' + source.GetDescription() + ')';
+            return Name + '(' + m_source.GetDescription() + ')';
         }
 
         public override int GetHashCode()
         {
-            return source.GetHashCode() + Name.GetHashCode();
+            return m_source.GetHashCode() + Name.GetHashCode();
         }
 
         public override bool Equals(object o)
@@ -50,12 +50,12 @@ namespace Lucene.Net.Queries.Function.ValueSources
             if (other == null)
                 return false;
             return Name.Equals(other.Name) 
-                && source.Equals(other.source);
+                && m_source.Equals(other.m_source);
         }
 
         public override void CreateWeight(IDictionary context, IndexSearcher searcher)
         {
-            source.CreateWeight(context, searcher);
+            m_source.CreateWeight(context, searcher);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/SumTotalTermFreqValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/SumTotalTermFreqValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/SumTotalTermFreqValueSource.cs
index 188a88d..907481b 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/SumTotalTermFreqValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/SumTotalTermFreqValueSource.cs
@@ -31,11 +31,11 @@ namespace Lucene.Net.Queries.Function.ValueSources
     /// </summary>
     public class SumTotalTermFreqValueSource : ValueSource
     {
-        protected readonly string indexedField;
+        protected readonly string m_indexedField;
 
         public SumTotalTermFreqValueSource(string indexedField)
         {
-            this.indexedField = indexedField;
+            this.m_indexedField = indexedField;
         }
 
         public virtual string Name
@@ -45,7 +45,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         public override string GetDescription()
         {
-            return Name + '(' + indexedField + ')';
+            return Name + '(' + m_indexedField + ')';
         }
 
         public override FunctionValues GetValues(IDictionary context, AtomicReaderContext
readerContext)
@@ -63,7 +63,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
                 {
                     continue;
                 }
-                Terms terms = fields.Terms(indexedField);
+                Terms terms = fields.Terms(m_indexedField);
                 if (terms == null)
                 {
                     continue;
@@ -104,7 +104,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         public override int GetHashCode()
         {
-            return this.GetType().GetHashCode() + indexedField.GetHashCode();
+            return this.GetType().GetHashCode() + m_indexedField.GetHashCode();
         }
 
         public override bool Equals(object o)
@@ -112,7 +112,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
             var other = o as SumTotalTermFreqValueSource;
             if (other == null)
                 return false;
-            return this.indexedField.Equals(other.indexedField);
+            return this.m_indexedField.Equals(other.m_indexedField);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
index cc6ce64..8780c98 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
@@ -55,9 +55,9 @@ namespace Lucene.Net.Queries.Function.ValueSources
         public override FunctionValues GetValues(IDictionary context, AtomicReaderContext
readerContext)
         {
             var fields = readerContext.AtomicReader.Fields;
-            var terms = fields.Terms(indexedField);
+            var terms = fields.Terms(m_indexedField);
             var searcher = (IndexSearcher)context["searcher"];
-            var similarity = IDFValueSource.AsTFIDF(searcher.Similarity, indexedField);
+            var similarity = IDFValueSource.AsTFIDF(searcher.Similarity, m_indexedField);
             if (similarity == null)
             {
                 throw new System.NotSupportedException("requires a TFIDFSimilarity (such
as DefaultSimilarity)");
@@ -94,7 +94,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
                 if (terms != null)
                 {
                     TermsEnum termsEnum = terms.GetIterator(null);
-                    if (termsEnum.SeekExact(outerInstance.indexedBytes))
+                    if (termsEnum.SeekExact(outerInstance.m_indexedBytes))
                     {
                         docs = termsEnum.Docs(null, null);
                     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
index 6527c67..213a548 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
@@ -48,7 +48,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
         public override FunctionValues GetValues(IDictionary context, AtomicReaderContext
readerContext)
         {
             Fields fields = readerContext.AtomicReader.Fields;
-            Terms terms = fields.Terms(indexedField);
+            Terms terms = fields.Terms(m_indexedField);
 
             return new IntDocValuesAnonymousInnerClassHelper(this, this, terms);
         }
@@ -79,7 +79,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
                 if (terms != null)
                 {
                     TermsEnum termsEnum = terms.GetIterator(null);
-                    if (termsEnum.SeekExact(outerInstance.indexedBytes))
+                    if (termsEnum.SeekExact(outerInstance.m_indexedBytes))
                     {
                         docs = termsEnum.Docs(null, null);
                     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/TotalTermFreqValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/TotalTermFreqValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/TotalTermFreqValueSource.cs
index 1004bb8..f083968 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/TotalTermFreqValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/TotalTermFreqValueSource.cs
@@ -32,17 +32,17 @@ namespace Lucene.Net.Queries.Function.ValueSources
     /// </summary>
     public class TotalTermFreqValueSource : ValueSource
     {
-        protected readonly string field;
-        protected readonly string indexedField;
-        protected readonly string val;
-        protected readonly BytesRef indexedBytes;
+        protected readonly string m_field;
+        protected readonly string m_indexedField;
+        protected readonly string m_val;
+        protected readonly BytesRef m_indexedBytes;
 
         public TotalTermFreqValueSource(string field, string val, string indexedField, BytesRef
indexedBytes)
         {
-            this.field = field;
-            this.val = val;
-            this.indexedField = indexedField;
-            this.indexedBytes = indexedBytes;
+            this.m_field = field;
+            this.m_val = val;
+            this.m_indexedField = indexedField;
+            this.m_indexedBytes = indexedBytes;
         }
 
         public virtual string Name
@@ -52,7 +52,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         public override string GetDescription()
         {
-            return Name + '(' + field + ',' + val + ')';
+            return Name + '(' + m_field + ',' + m_val + ')';
         }
 
         public override FunctionValues GetValues(IDictionary context, AtomicReaderContext
readerContext)
@@ -65,7 +65,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
             long totalTermFreq = 0;
             foreach (var readerContext in searcher.TopReaderContext.Leaves)
             {
-                long val = readerContext.Reader.TotalTermFreq(new Term(indexedField, indexedBytes));
+                long val = readerContext.Reader.TotalTermFreq(new Term(m_indexedField, m_indexedBytes));
                 if (val == -1)
                 {
                     totalTermFreq = -1;
@@ -101,7 +101,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         public override int GetHashCode()
         {
-            return this.GetType().GetHashCode() + indexedField.GetHashCode() * 29 + indexedBytes.GetHashCode();
+            return this.GetType().GetHashCode() + m_indexedField.GetHashCode() * 29 + m_indexedBytes.GetHashCode();
         }
 
         public override bool Equals(object o)
@@ -111,7 +111,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
                 return false;
             }
             var other = (TotalTermFreqValueSource)o;
-            return this.indexedField.Equals(other.indexedField) && this.indexedBytes.Equals(other.indexedBytes);
+            return this.m_indexedField.Equals(other.m_indexedField) && this.m_indexedBytes.Equals(other.m_indexedBytes);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/Function/ValueSources/VectorValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/VectorValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/VectorValueSource.cs
index b914435..d8a6911 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/VectorValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/VectorValueSource.cs
@@ -30,25 +30,24 @@ namespace Lucene.Net.Queries.Function.ValueSources
     //Not crazy about the name, but...
     public class VectorValueSource : MultiValueSource
     {
-        protected readonly IList<ValueSource> sources;
-
+        protected readonly IList<ValueSource> m_sources;
 
         public VectorValueSource(IList<ValueSource> sources)
         {
-            this.sources = sources;
+            this.m_sources = sources;
         }
 
         public virtual IList<ValueSource> Sources
         {
             get
             {
-                return sources;
+                return m_sources;
             }
         }
 
         public override int Dimension
         {
-            get { return sources.Count; }
+            get { return m_sources.Count; }
         }
 
         public virtual string Name
@@ -58,20 +57,20 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         public override FunctionValues GetValues(IDictionary context, AtomicReaderContext
readerContext)
         {
-            var size = sources.Count;
+            var size = m_sources.Count;
 
             // special-case x,y and lat,lon since it's so common
             if (size == 2)
             {
-                var x = sources[0].GetValues(context, readerContext);
-                var y = sources[1].GetValues(context, readerContext);
+                var x = m_sources[0].GetValues(context, readerContext);
+                var y = m_sources[1].GetValues(context, readerContext);
                 return new FunctionValuesAnonymousInnerClassHelper(this, x, y);
             }
 
             var valsArr = new FunctionValues[size];
             for (int i = 0; i < size; i++)
             {
-                valsArr[i] = sources[i].GetValues(context, readerContext);
+                valsArr[i] = m_sources[i].GetValues(context, readerContext);
             }
 
             return new FunctionValuesAnonymousInnerClassHelper2(this, valsArr);
@@ -224,7 +223,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
 
         public override void CreateWeight(IDictionary context, IndexSearcher searcher)
         {
-            foreach (ValueSource source in sources)
+            foreach (ValueSource source in m_sources)
             {
                 source.CreateWeight(context, searcher);
             }
@@ -236,7 +235,7 @@ namespace Lucene.Net.Queries.Function.ValueSources
             var sb = new StringBuilder();
             sb.Append(Name).Append('(');
             bool firstTime = true;
-            foreach (ValueSource source in sources)
+            foreach (ValueSource source in m_sources)
             {
                 if (firstTime)
                 {
@@ -264,12 +263,12 @@ namespace Lucene.Net.Queries.Function.ValueSources
             }
 
             var that = (VectorValueSource)o;
-            return sources.Equals(that.sources);
+            return m_sources.Equals(that.m_sources);
         }
 
         public override int GetHashCode()
         {
-            return sources.GetHashCode();
+            return m_sources.GetHashCode();
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Queries/TermsFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/TermsFilter.cs b/src/Lucene.Net.Queries/TermsFilter.cs
index bc10111..3cff069 100644
--- a/src/Lucene.Net.Queries/TermsFilter.cs
+++ b/src/Lucene.Net.Queries/TermsFilter.cs
@@ -83,7 +83,7 @@ namespace Lucene.Net.Queries
                 if (iter.MoveNext())
                 {
                     var next = iter.Current;
-                    field = next.Field;
+                    m_field = next.Field;
                     return next.Bytes;
                 }
                 return null;
@@ -388,7 +388,7 @@ namespace Lucene.Net.Queries
         {
             public TermsFilter OuterInstance { get; internal set; }
 
-            protected string field;
+            protected string m_field;
 
             public abstract BytesRef Next();
 
@@ -398,12 +398,12 @@ namespace Lucene.Net.Queries
 
             public FieldAndTermEnum(string field)
             {
-                this.field = field;
+                this.m_field = field;
             }
 
             public virtual string Field
             {
-                get { return field; }
+                get { return m_field; }
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d60b93d9/src/Lucene.Net.Tests.Queries/TestCustomScoreQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/TestCustomScoreQuery.cs b/src/Lucene.Net.Tests.Queries/TestCustomScoreQuery.cs
index 2971df9..b1d6b82 100644
--- a/src/Lucene.Net.Tests.Queries/TestCustomScoreQuery.cs
+++ b/src/Lucene.Net.Tests.Queries/TestCustomScoreQuery.cs
@@ -202,7 +202,7 @@ namespace Lucene.Net.Tests.Queries
 
                 public override float CustomScore(int doc, float subScore, float valSrcScore)
                 {
-                    assertTrue(doc <= context.AtomicReader.MaxDoc);
+                    assertTrue(doc <= m_context.AtomicReader.MaxDoc);
                     return values.Get(doc);
                 }
             }


Mime
View raw message