lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [32/50] [abbrv] lucenenet git commit: Lucene.Net.Facet refactor: Renamed protected fields camelCase prefixed with m_
Date Tue, 31 Jan 2017 17:56:05 GMT
Lucene.Net.Facet refactor: Renamed protected fields camelCase prefixed with m_


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

Branch: refs/heads/api-work
Commit: e4657fbd8502d894e06ff5b4f44a10c649a11c3f
Parents: e4da8d2
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Tue Jan 31 16:20:41 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Tue Jan 31 16:20:41 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Facet/DrillSideways.cs           | 36 ++++++++--------
 .../Range/DoubleRangeFacetCounts.cs             | 12 +++---
 .../Range/LongRangeFacetCounts.cs               | 12 +++---
 src/Lucene.Net.Facet/Range/RangeFacetCounts.cs  | 32 +++++++-------
 .../Taxonomy/FastTaxonomyFacetCounts.cs         |  4 +-
 .../Taxonomy/FloatTaxonomyFacets.cs             | 42 +++++++++---------
 .../Taxonomy/IntTaxonomyFacets.cs               | 42 +++++++++---------
 .../Taxonomy/TaxonomyFacetCounts.cs             |  2 +-
 .../TaxonomyFacetSumFloatAssociations.cs        |  4 +-
 .../Taxonomy/TaxonomyFacetSumIntAssociations.cs |  4 +-
 .../Taxonomy/TaxonomyFacetSumValueSource.cs     |  2 +-
 src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs | 45 ++++++++++----------
 .../WriterCache/CompactLabelToOrdinal.cs        |  8 ++--
 .../Taxonomy/WriterCache/LabelToOrdinal.cs      |  6 +--
 .../Range/TestRangeFacetCounts.cs               |  2 +-
 src/Lucene.Net.Tests.Facet/TestDrillSideways.cs |  4 +-
 16 files changed, 128 insertions(+), 129 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/DrillSideways.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/DrillSideways.cs b/src/Lucene.Net.Facet/DrillSideways.cs
index d733e35..9930ddc 100644
--- a/src/Lucene.Net.Facet/DrillSideways.cs
+++ b/src/Lucene.Net.Facet/DrillSideways.cs
@@ -50,23 +50,23 @@ namespace Lucene.Net.Facet
         /// <summary>
         /// <see cref="IndexSearcher"/> passed to constructor.
         /// </summary>
-        protected internal readonly IndexSearcher searcher;
+        protected readonly IndexSearcher m_searcher;
 
         /// <summary>
         /// <see cref="TaxonomyReader"/> passed to constructor.
         /// </summary>
-        protected internal readonly TaxonomyReader taxoReader;
+        protected readonly TaxonomyReader m_taxoReader;
 
         /// <summary>
         /// <see cref="SortedSetDocValuesReaderState"/> passed to
         /// constructor; can be <c>null</c>. 
         /// </summary>
-        protected internal readonly SortedSetDocValuesReaderState state;
+        protected readonly SortedSetDocValuesReaderState m_state;
 
         /// <summary>
         /// <see cref="FacetsConfig"/> passed to constructor.
         /// </summary>
-        protected internal readonly FacetsConfig config;
+        protected readonly FacetsConfig m_config;
 
         /// <summary>
         /// Create a new <see cref="DrillSideways"/> instance.
@@ -92,10 +92,10 @@ namespace Lucene.Net.Facet
         /// </summary>
         public DrillSideways(IndexSearcher searcher, FacetsConfig config, TaxonomyReader
taxoReader, SortedSetDocValuesReaderState state)
         {
-            this.searcher = searcher;
-            this.config = config;
-            this.taxoReader = taxoReader;
-            this.state = state;
+            this.m_searcher = searcher;
+            this.m_config = config;
+            this.m_taxoReader = taxoReader;
+            this.m_state = state;
         }
 
         /// <summary>
@@ -108,25 +108,25 @@ namespace Lucene.Net.Facet
             Facets drillDownFacets;
             var drillSidewaysFacets = new Dictionary<string, Facets>();
 
-            if (taxoReader != null)
+            if (m_taxoReader != null)
             {
-                drillDownFacets = new FastTaxonomyFacetCounts(taxoReader, config, drillDowns);
+                drillDownFacets = new FastTaxonomyFacetCounts(m_taxoReader, m_config, drillDowns);
                 if (drillSideways != null)
                 {
                     for (int i = 0; i < drillSideways.Length; i++)
                     {
-                        drillSidewaysFacets[drillSidewaysDims[i]] = new FastTaxonomyFacetCounts(taxoReader,
config, drillSideways[i]);
+                        drillSidewaysFacets[drillSidewaysDims[i]] = new FastTaxonomyFacetCounts(m_taxoReader,
m_config, drillSideways[i]);
                     }
                 }
             }
             else
             {
-                drillDownFacets = new SortedSetDocValuesFacetCounts(state, drillDowns);
+                drillDownFacets = new SortedSetDocValuesFacetCounts(m_state, drillDowns);
                 if (drillSideways != null)
                 {
                     for (int i = 0; i < drillSideways.Length; i++)
                     {
-                        drillSidewaysFacets[drillSidewaysDims[i]] = new SortedSetDocValuesFacetCounts(state,
drillSideways[i]);
+                        drillSidewaysFacets[drillSidewaysDims[i]] = new SortedSetDocValuesFacetCounts(m_state,
drillSideways[i]);
                     }
                 }
             }
@@ -156,7 +156,7 @@ namespace Lucene.Net.Facet
             {
                 // There are no drill-down dims, so there is no
                 // drill-sideways to compute:
-                searcher.Search(query, MultiCollector.Wrap(hitCollector, drillDownCollector));
+                m_searcher.Search(query, MultiCollector.Wrap(hitCollector, drillDownCollector));
                 return new DrillSidewaysResult(BuildFacetsResult(drillDownCollector, null,
null), null);
             }
 
@@ -191,7 +191,7 @@ namespace Lucene.Net.Facet
                 drillDownQueries[i - startClause] = clauses[i].Query;
             }
             DrillSidewaysQuery dsq = new DrillSidewaysQuery(baseQuery, drillDownCollector,
drillSidewaysCollectors, drillDownQueries, ScoreSubDocsAtOnce());
-            searcher.Search(dsq, hitCollector);
+            m_searcher.Search(dsq, hitCollector);
 
             return new DrillSidewaysResult(BuildFacetsResult(drillDownCollector, drillSidewaysCollectors,
drillDownDims.Keys.ToArray()), null);
         }
@@ -204,11 +204,11 @@ namespace Lucene.Net.Facet
         {
             if (filter != null)
             {
-                query = new DrillDownQuery(config, filter, query);
+                query = new DrillDownQuery(m_config, filter, query);
             }
             if (sort != null)
             {
-                int limit = searcher.IndexReader.MaxDoc;
+                int limit = m_searcher.IndexReader.MaxDoc;
                 if (limit == 0)
                 {
                     limit = 1; // the collector does not alow numHits = 0
@@ -239,7 +239,7 @@ namespace Lucene.Net.Facet
         /// </summary>
         public virtual DrillSidewaysResult Search(ScoreDoc after, DrillDownQuery query, int
topN)
         {
-            int limit = searcher.IndexReader.MaxDoc;
+            int limit = m_searcher.IndexReader.MaxDoc;
             if (limit == 0)
             {
                 limit = 1; // the collector does not alow numHits = 0

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Range/DoubleRangeFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Range/DoubleRangeFacetCounts.cs b/src/Lucene.Net.Facet/Range/DoubleRangeFacetCounts.cs
index e6b1931..c9d0dba 100644
--- a/src/Lucene.Net.Facet/Range/DoubleRangeFacetCounts.cs
+++ b/src/Lucene.Net.Facet/Range/DoubleRangeFacetCounts.cs
@@ -85,7 +85,7 @@ namespace Lucene.Net.Facet.Range
         private void Count(ValueSource valueSource, IEnumerable<MatchingDocs> matchingDocs)
         {
 
-            DoubleRange[] ranges = (DoubleRange[])this.ranges;
+            DoubleRange[] ranges = (DoubleRange[])this.m_ranges;
 
             LongRange[] longRanges = new LongRange[ranges.Length];
             for (int i = 0; i < ranges.Length; i++)
@@ -101,11 +101,11 @@ namespace Lucene.Net.Facet.Range
             {
                 FunctionValues fv = valueSource.GetValues(new Dictionary<string, object>(),
hits.Context);
 
-                totCount += hits.TotalHits;
+                m_totCount += hits.TotalHits;
                 IBits bits;
-                if (fastMatchFilter != null)
+                if (m_fastMatchFilter != null)
                 {
-                    DocIdSet dis = fastMatchFilter.GetDocIdSet(hits.Context, null);
+                    DocIdSet dis = m_fastMatchFilter.GetDocIdSet(hits.Context, null);
                     if (dis == null)
                     {
                         // No documents match
@@ -144,8 +144,8 @@ namespace Lucene.Net.Facet.Range
                 }
             }
 
-            missingCount += counter.FillCounts(counts);
-            totCount -= missingCount;
+            missingCount += counter.FillCounts(m_counts);
+            m_totCount -= missingCount;
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Range/LongRangeFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Range/LongRangeFacetCounts.cs b/src/Lucene.Net.Facet/Range/LongRangeFacetCounts.cs
index af39cef..4e82e94 100644
--- a/src/Lucene.Net.Facet/Range/LongRangeFacetCounts.cs
+++ b/src/Lucene.Net.Facet/Range/LongRangeFacetCounts.cs
@@ -78,7 +78,7 @@ namespace Lucene.Net.Facet.Range
         private void Count(ValueSource valueSource, IList<MatchingDocs> matchingDocs)
         {
 
-            LongRange[] ranges = (LongRange[])this.ranges;
+            LongRange[] ranges = (LongRange[])this.m_ranges;
 
             LongRangeCounter counter = new LongRangeCounter(ranges);
 
@@ -87,11 +87,11 @@ namespace Lucene.Net.Facet.Range
             {
                 FunctionValues fv = valueSource.GetValues(new Dictionary<string, object>(),
hits.Context);
 
-                totCount += hits.TotalHits;
+                m_totCount += hits.TotalHits;
                 IBits bits;
-                if (fastMatchFilter != null)
+                if (m_fastMatchFilter != null)
                 {
-                    DocIdSet dis = fastMatchFilter.GetDocIdSet(hits.Context, null);
+                    DocIdSet dis = m_fastMatchFilter.GetDocIdSet(hits.Context, null);
                     if (dis == null)
                     {
                         // No documents match
@@ -129,12 +129,12 @@ namespace Lucene.Net.Facet.Range
                 }
             }
 
-            int x = counter.FillCounts(counts);
+            int x = counter.FillCounts(m_counts);
 
             missingCount += x;
 
             //System.out.println("totCount " + totCount + " missingCount " + counter.missingCount);
-            totCount -= missingCount;
+            m_totCount -= missingCount;
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Range/RangeFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Range/RangeFacetCounts.cs b/src/Lucene.Net.Facet/Range/RangeFacetCounts.cs
index f9bf70f..e1cdea4 100644
--- a/src/Lucene.Net.Facet/Range/RangeFacetCounts.cs
+++ b/src/Lucene.Net.Facet/Range/RangeFacetCounts.cs
@@ -30,11 +30,11 @@ namespace Lucene.Net.Facet.Range
     {
         /// <summary>
         /// Ranges passed to constructor. </summary>
-        protected internal readonly Range[] ranges;
+        protected readonly Range[] m_ranges;
 
         /// <summary>
         /// Counts, initialized in by subclass. </summary>
-        protected internal readonly int[] counts;
+        protected readonly int[] m_counts;
 
         /// <summary>
         /// Optional: if specified, we first test this Filter to
@@ -42,42 +42,42 @@ namespace Lucene.Net.Facet.Range
         /// matching ranges.  If this is null, all documents are
         /// checked. 
         /// </summary>
-        protected internal readonly Filter fastMatchFilter;
+        protected readonly Filter m_fastMatchFilter;
 
         /// <summary>
         /// Our field name. </summary>
-        protected internal readonly string field;
+        protected readonly string m_field;
 
         /// <summary>
         /// Total number of hits. </summary>
-        protected internal int totCount;
+        protected int m_totCount;
 
         /// <summary>
         /// Create <see cref="RangeFacetCounts"/> </summary>
-        protected internal RangeFacetCounts(string field, Range[] ranges, Filter fastMatchFilter)
+        protected RangeFacetCounts(string field, Range[] ranges, Filter fastMatchFilter)
         {
-            this.field = field;
-            this.ranges = ranges;
-            this.fastMatchFilter = fastMatchFilter;
-            counts = new int[ranges.Length];
+            this.m_field = field;
+            this.m_ranges = ranges;
+            this.m_fastMatchFilter = fastMatchFilter;
+            m_counts = new int[ranges.Length];
         }
 
         public override FacetResult GetTopChildren(int topN, string dim, params string[]
path)
         {
-            if (dim.Equals(field) == false)
+            if (dim.Equals(m_field) == false)
             {
-                throw new System.ArgumentException("invalid dim \"" + dim + "\"; should be
\"" + field + "\"");
+                throw new System.ArgumentException("invalid dim \"" + dim + "\"; should be
\"" + m_field + "\"");
             }
             if (path.Length != 0)
             {
                 throw new System.ArgumentException("path.length should be 0");
             }
-            LabelAndValue[] labelValues = new LabelAndValue[counts.Length];
-            for (int i = 0; i < counts.Length; i++)
+            LabelAndValue[] labelValues = new LabelAndValue[m_counts.Length];
+            for (int i = 0; i < m_counts.Length; i++)
             {
-                labelValues[i] = new LabelAndValue(ranges[i].Label, counts[i]);
+                labelValues[i] = new LabelAndValue(m_ranges[i].Label, m_counts[i]);
             }
-            return new FacetResult(dim, path, totCount, labelValues, labelValues.Length);
+            return new FacetResult(dim, path, m_totCount, labelValues, labelValues.Length);
         }
 
         public override float GetSpecificValue(string dim, params string[] path)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Taxonomy/FastTaxonomyFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/FastTaxonomyFacetCounts.cs b/src/Lucene.Net.Facet/Taxonomy/FastTaxonomyFacetCounts.cs
index 6cb5043..44909ca 100644
--- a/src/Lucene.Net.Facet/Taxonomy/FastTaxonomyFacetCounts.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/FastTaxonomyFacetCounts.cs
@@ -58,7 +58,7 @@ namespace Lucene.Net.Facet.Taxonomy
         {
             foreach (FacetsCollector.MatchingDocs hits in matchingDocs)
             {
-                BinaryDocValues dv = hits.Context.AtomicReader.GetBinaryDocValues(indexFieldName);
+                BinaryDocValues dv = hits.Context.AtomicReader.GetBinaryDocValues(m_indexFieldName);
                 if (dv == null) // this reader does not have DocValues for the requested
category list
                 {
                     continue;
@@ -82,7 +82,7 @@ namespace Lucene.Net.Facet.Taxonomy
                         if ((sbyte)b >= 0)
                         {
                             prev = ord = ((ord << 7) | b) + prev;
-                            ++values[ord];
+                            ++m_values[ord];
                             ord = 0;
                         }
                         else

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Taxonomy/FloatTaxonomyFacets.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/FloatTaxonomyFacets.cs b/src/Lucene.Net.Facet/Taxonomy/FloatTaxonomyFacets.cs
index d8cdcab..4304646 100644
--- a/src/Lucene.Net.Facet/Taxonomy/FloatTaxonomyFacets.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/FloatTaxonomyFacets.cs
@@ -31,15 +31,15 @@ namespace Lucene.Net.Facet.Taxonomy
     {
         /// <summary>
         /// Per-ordinal value. </summary>
-        protected readonly float[] values;
+        protected readonly float[] m_values;
 
         /// <summary>
         /// Sole constructor.
         /// </summary>
-        protected internal FloatTaxonomyFacets(string indexFieldName, TaxonomyReader taxoReader,
FacetsConfig config)
+        protected FloatTaxonomyFacets(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig
config)
             : base(indexFieldName, taxoReader, config)
         {
-            values = new float[taxoReader.Count];
+            m_values = new float[taxoReader.Count];
         }
 
         /// <summary>
@@ -48,15 +48,15 @@ namespace Lucene.Net.Facet.Taxonomy
         protected virtual void Rollup()
         {
             // Rollup any necessary dims:
-            foreach (KeyValuePair<string, FacetsConfig.DimConfig> ent in config.DimConfigs)
+            foreach (KeyValuePair<string, FacetsConfig.DimConfig> ent in m_config.DimConfigs)
             {
                 string dim = ent.Key;
                 FacetsConfig.DimConfig ft = ent.Value;
                 if (ft.Hierarchical && ft.MultiValued == false)
                 {
-                    int dimRootOrd = taxoReader.GetOrdinal(new FacetLabel(dim));
+                    int dimRootOrd = m_taxoReader.GetOrdinal(new FacetLabel(dim));
                     Debug.Assert(dimRootOrd > 0);
-                    values[dimRootOrd] += Rollup(children[dimRootOrd]);
+                    m_values[dimRootOrd] += Rollup(m_children[dimRootOrd]);
                 }
             }
         }
@@ -66,10 +66,10 @@ namespace Lucene.Net.Facet.Taxonomy
             float sum = 0;
             while (ord != TaxonomyReader.INVALID_ORDINAL)
             {
-                float childValue = values[ord] + Rollup(children[ord]);
-                values[ord] = childValue;
+                float childValue = m_values[ord] + Rollup(m_children[ord]);
+                m_values[ord] = childValue;
                 sum += childValue;
-                ord = siblings[ord];
+                ord = m_siblings[ord];
             }
             return sum;
         }
@@ -92,12 +92,12 @@ namespace Lucene.Net.Facet.Taxonomy
                     throw new System.ArgumentException("cannot return dimension-level value
alone; use getTopChildren instead");
                 }
             }
-            int ord = taxoReader.GetOrdinal(new FacetLabel(dim, path));
+            int ord = m_taxoReader.GetOrdinal(new FacetLabel(dim, path));
             if (ord < 0)
             {
                 return -1;
             }
-            return values[ord];
+            return m_values[ord];
         }
 
         public override FacetResult GetTopChildren(int topN, string dim, params string[]
path)
@@ -108,34 +108,34 @@ namespace Lucene.Net.Facet.Taxonomy
             }
             FacetsConfig.DimConfig dimConfig = VerifyDim(dim);
             FacetLabel cp = new FacetLabel(dim, path);
-            int dimOrd = taxoReader.GetOrdinal(cp);
+            int dimOrd = m_taxoReader.GetOrdinal(cp);
             if (dimOrd == -1)
             {
                 return null;
             }
 
-            TopOrdAndFloatQueue q = new TopOrdAndFloatQueue(Math.Min(taxoReader.Count, topN));
+            TopOrdAndFloatQueue q = new TopOrdAndFloatQueue(Math.Min(m_taxoReader.Count,
topN));
             float bottomValue = 0;
 
-            int ord = children[dimOrd];
+            int ord = m_children[dimOrd];
             float sumValues = 0;
             int childCount = 0;
 
             TopOrdAndFloatQueue.OrdAndValue reuse = null;
             while (ord != TaxonomyReader.INVALID_ORDINAL)
             {
-                if (values[ord] > 0)
+                if (m_values[ord] > 0)
                 {
-                    sumValues += values[ord];
+                    sumValues += m_values[ord];
                     childCount++;
-                    if (values[ord] > bottomValue)
+                    if (m_values[ord] > bottomValue)
                     {
                         if (reuse == null)
                         {
                             reuse = new TopOrdAndFloatQueue.OrdAndValue();
                         }
                         reuse.Ord = ord;
-                        reuse.Value = values[ord];
+                        reuse.Value = m_values[ord];
                         reuse = q.InsertWithOverflow(reuse);
                         if (q.Count == topN)
                         {
@@ -144,7 +144,7 @@ namespace Lucene.Net.Facet.Taxonomy
                     }
                 }
 
-                ord = siblings[ord];
+                ord = m_siblings[ord];
             }
 
             if (sumValues == 0)
@@ -156,7 +156,7 @@ namespace Lucene.Net.Facet.Taxonomy
             {
                 if (dimConfig.RequireDimCount)
                 {
-                    sumValues = values[dimOrd];
+                    sumValues = m_values[dimOrd];
                 }
                 else
                 {
@@ -173,7 +173,7 @@ namespace Lucene.Net.Facet.Taxonomy
             for (int i = labelValues.Length - 1; i >= 0; i--)
             {
                 TopOrdAndFloatQueue.OrdAndValue ordAndValue = q.Pop();
-                FacetLabel child = taxoReader.GetPath(ordAndValue.Ord);
+                FacetLabel child = m_taxoReader.GetPath(ordAndValue.Ord);
                 labelValues[i] = new LabelAndValue(child.Components[cp.Length], ordAndValue.Value);
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Taxonomy/IntTaxonomyFacets.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/IntTaxonomyFacets.cs b/src/Lucene.Net.Facet/Taxonomy/IntTaxonomyFacets.cs
index 8e8fc5d..fc279c5 100644
--- a/src/Lucene.Net.Facet/Taxonomy/IntTaxonomyFacets.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/IntTaxonomyFacets.cs
@@ -31,15 +31,15 @@ namespace Lucene.Net.Facet.Taxonomy
     {
         /// <summary>
         /// Per-ordinal value. </summary>
-        protected internal readonly int[] values;
+        protected readonly int[] m_values;
 
         /// <summary>
         /// Sole constructor.
         /// </summary>
-        protected internal IntTaxonomyFacets(string indexFieldName, TaxonomyReader taxoReader,
FacetsConfig config)
+        protected IntTaxonomyFacets(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig
config)
             : base(indexFieldName, taxoReader, config)
         {
-            values = new int[taxoReader.Count];
+            m_values = new int[taxoReader.Count];
         }
 
         /// <summary>
@@ -48,18 +48,18 @@ namespace Lucene.Net.Facet.Taxonomy
         protected virtual void Rollup()
         {
             // Rollup any necessary dims:
-            foreach (KeyValuePair<string, FacetsConfig.DimConfig> ent in config.DimConfigs)
+            foreach (KeyValuePair<string, FacetsConfig.DimConfig> ent in m_config.DimConfigs)
             {
                 string dim = ent.Key;
                 FacetsConfig.DimConfig ft = ent.Value;
                 if (ft.Hierarchical && ft.MultiValued == false)
                 {
-                    int dimRootOrd = taxoReader.GetOrdinal(new FacetLabel(dim));
+                    int dimRootOrd = m_taxoReader.GetOrdinal(new FacetLabel(dim));
                     // It can be -1 if this field was declared in the
                     // config but never indexed:
                     if (dimRootOrd > 0)
                     {
-                        values[dimRootOrd] += Rollup(children[dimRootOrd]);
+                        m_values[dimRootOrd] += Rollup(m_children[dimRootOrd]);
                     }
                 }
             }
@@ -70,10 +70,10 @@ namespace Lucene.Net.Facet.Taxonomy
             int sum = 0;
             while (ord != TaxonomyReader.INVALID_ORDINAL)
             {
-                int childValue = values[ord] + Rollup(children[ord]);
-                values[ord] = childValue;
+                int childValue = m_values[ord] + Rollup(m_children[ord]);
+                m_values[ord] = childValue;
                 sum += childValue;
-                ord = siblings[ord];
+                ord = m_siblings[ord];
             }
             return sum;
         }
@@ -96,12 +96,12 @@ namespace Lucene.Net.Facet.Taxonomy
                     throw new System.ArgumentException("cannot return dimension-level value
alone; use getTopChildren instead");
                 }
             }
-            int ord = taxoReader.GetOrdinal(new FacetLabel(dim, path));
+            int ord = m_taxoReader.GetOrdinal(new FacetLabel(dim, path));
             if (ord < 0)
             {
                 return -1;
             }
-            return values[ord];
+            return m_values[ord];
         }
 
         public override FacetResult GetTopChildren(int topN, string dim, params string[]
path)
@@ -112,35 +112,35 @@ namespace Lucene.Net.Facet.Taxonomy
             }
             var dimConfig = VerifyDim(dim);
             FacetLabel cp = new FacetLabel(dim, path);
-            int dimOrd = taxoReader.GetOrdinal(cp);
+            int dimOrd = m_taxoReader.GetOrdinal(cp);
             if (dimOrd == -1)
             {
                 return null;
             }
 
-            TopOrdAndIntQueue q = new TopOrdAndIntQueue(Math.Min(taxoReader.Count, topN));
+            TopOrdAndIntQueue q = new TopOrdAndIntQueue(Math.Min(m_taxoReader.Count, topN));
 
             int bottomValue = 0;
 
-            int ord = children[dimOrd];
+            int ord = m_children[dimOrd];
             int totValue = 0;
             int childCount = 0;
 
             TopOrdAndIntQueue.OrdAndValue reuse = null;
             while (ord != TaxonomyReader.INVALID_ORDINAL)
             {
-                if (values[ord] > 0)
+                if (m_values[ord] > 0)
                 {
-                    totValue += values[ord];
+                    totValue += m_values[ord];
                     childCount++;
-                    if (values[ord] > bottomValue)
+                    if (m_values[ord] > bottomValue)
                     {
                         if (reuse == null)
                         {
                             reuse = new TopOrdAndIntQueue.OrdAndValue();
                         }
                         reuse.Ord = ord;
-                        reuse.Value = values[ord];
+                        reuse.Value = m_values[ord];
                         reuse = q.InsertWithOverflow(reuse);
                         if (q.Count == topN)
                         {
@@ -149,7 +149,7 @@ namespace Lucene.Net.Facet.Taxonomy
                     }
                 }
 
-                ord = siblings[ord];
+                ord = m_siblings[ord];
             }
 
             if (totValue == 0)
@@ -161,7 +161,7 @@ namespace Lucene.Net.Facet.Taxonomy
             {
                 if (dimConfig.RequireDimCount)
                 {
-                    totValue = values[dimOrd];
+                    totValue = m_values[dimOrd];
                 }
                 else
                 {
@@ -178,7 +178,7 @@ namespace Lucene.Net.Facet.Taxonomy
             for (int i = labelValues.Length - 1; i >= 0; i--)
             {
                 TopOrdAndIntQueue.OrdAndValue ordAndValue = q.Pop();
-                FacetLabel child = taxoReader.GetPath(ordAndValue.Ord);
+                FacetLabel child = m_taxoReader.GetPath(ordAndValue.Ord);
                 labelValues[i] = new LabelAndValue(child.Components[cp.Length], ordAndValue.Value);
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs
index aa4acac..f6c4ca4 100644
--- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs
@@ -60,7 +60,7 @@ namespace Lucene.Net.Facet.Taxonomy
                     ords.Get(doc, scratch);
                     for (int i = 0; i < scratch.Length; i++)
                     {
-                        values[scratch.Ints[scratch.Offset + i]]++;
+                        m_values[scratch.Ints[scratch.Offset + i]]++;
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumFloatAssociations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumFloatAssociations.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumFloatAssociations.cs
index 242466d..9a4612a 100644
--- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumFloatAssociations.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumFloatAssociations.cs
@@ -58,7 +58,7 @@ namespace Lucene.Net.Facet.Taxonomy
             //System.out.println("count matchingDocs=" + matchingDocs + " facetsField=" +
facetsFieldName);
             foreach (FacetsCollector.MatchingDocs hits in matchingDocs)
             {
-                BinaryDocValues dv = hits.Context.AtomicReader.GetBinaryDocValues(indexFieldName);
+                BinaryDocValues dv = hits.Context.AtomicReader.GetBinaryDocValues(m_indexFieldName);
                 if (dv == null) // this reader does not have DocValues for the requested
category list
                 {
                     continue;
@@ -85,7 +85,7 @@ namespace Lucene.Net.Facet.Taxonomy
                         int value = ((bytes[offset] & 0xFF) << 24) | ((bytes[offset
+ 1] & 0xFF) << 16) | 
                             ((bytes[offset + 2] & 0xFF) << 8) | (bytes[offset +
3] & 0xFF);
                         offset += 4;
-                        values[ord] += Number.IntBitsToFloat(value);
+                        m_values[ord] += Number.IntBitsToFloat(value);
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumIntAssociations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumIntAssociations.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumIntAssociations.cs
index 07b78b0..fc45bdb 100644
--- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumIntAssociations.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumIntAssociations.cs
@@ -57,7 +57,7 @@ namespace Lucene.Net.Facet.Taxonomy
             //System.out.println("count matchingDocs=" + matchingDocs + " facetsField=" +
facetsFieldName);
             foreach (FacetsCollector.MatchingDocs hits in matchingDocs)
             {
-                BinaryDocValues dv = hits.Context.AtomicReader.GetBinaryDocValues(indexFieldName);
+                BinaryDocValues dv = hits.Context.AtomicReader.GetBinaryDocValues(m_indexFieldName);
                 if (dv == null) // this reader does not have DocValues for the requested
category list
                 {
                     continue;
@@ -84,7 +84,7 @@ namespace Lucene.Net.Facet.Taxonomy
                         int value = ((bytes[offset] & 0xFF) << 24) | ((bytes[offset
+ 1] & 0xFF) << 16) | 
                             ((bytes[offset + 2] & 0xFF) << 8) | (bytes[offset +
3] & 0xFF);
                         offset += 4;
-                        values[ord] += value;
+                        m_values[ord] += value;
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumValueSource.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumValueSource.cs
index be4a02c..b777f52 100644
--- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumValueSource.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumValueSource.cs
@@ -146,7 +146,7 @@ namespace Lucene.Net.Facet.Taxonomy
                     float value = (float)functionValues.DoubleVal(doc);
                     for (int i = 0; i < scratch.Length; i++)
                     {
-                        values[scratch.Ints[i]] += value;
+                        m_values[scratch.Ints[i]] += value;
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs
index 435b610..ec30ce1 100644
--- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs
@@ -57,41 +57,41 @@ namespace Lucene.Net.Facet.Taxonomy
         /// <summary>
         /// Index field name provided to the constructor.
         /// </summary>
-        protected readonly string indexFieldName;
+        protected readonly string m_indexFieldName;
 
         /// <summary>
         /// <see cref="TaxonomyReader"/> provided to the constructor.
         /// </summary>
-        protected readonly TaxonomyReader taxoReader;
+        protected readonly TaxonomyReader m_taxoReader;
 
         /// <summary>
         /// <see cref="FacetsConfig"/> provided to the constructor.
         /// </summary>
-        protected readonly FacetsConfig config;
+        protected readonly FacetsConfig m_config;
 
         /// <summary>
         /// Maps parent ordinal to its child, or -1 if the parent
         /// is childless. 
         /// </summary>
-        protected readonly int[] children;
+        protected readonly int[] m_children;
 
         /// <summary>
         /// Maps an ordinal to its sibling, or -1 if there is no
         /// sibling. 
         /// </summary>
-        protected readonly int[] siblings;
+        protected readonly int[] m_siblings;
 
         /// <summary>
         /// Sole constructor. 
         /// </summary>
         protected internal TaxonomyFacets(string indexFieldName, TaxonomyReader taxoReader,
FacetsConfig config)
         {
-            this.indexFieldName = indexFieldName;
-            this.taxoReader = taxoReader;
-            this.config = config;
+            this.m_indexFieldName = indexFieldName;
+            this.m_taxoReader = taxoReader;
+            this.m_config = config;
             ParallelTaxonomyArrays pta = taxoReader.ParallelTaxonomyArrays;
-            children = pta.Children;
-            siblings = pta.Siblings;
+            m_children = pta.Children;
+            m_siblings = pta.Siblings;
         }
 
         /// <summary>
@@ -99,25 +99,25 @@ namespace Lucene.Net.Facet.Taxonomy
         /// dimension is not recognized.  Otherwise, returns the
         /// <see cref="DimConfig"/> for this dimension. 
         /// </summary>
-        protected internal virtual DimConfig VerifyDim(string dim)
+        protected virtual DimConfig VerifyDim(string dim)
         {
-            DimConfig dimConfig = config.GetDimConfig(dim);
-            if (!dimConfig.IndexFieldName.Equals(indexFieldName))
+            DimConfig dimConfig = m_config.GetDimConfig(dim);
+            if (!dimConfig.IndexFieldName.Equals(m_indexFieldName))
             {
-                throw new System.ArgumentException("dimension \"" + dim + "\" was not indexed
into field \"" + indexFieldName);
+                throw new System.ArgumentException("dimension \"" + dim + "\" was not indexed
into field \"" + m_indexFieldName);
             }
             return dimConfig;
         }
 
         public override IList<FacetResult> GetAllDims(int topN)
         {
-            int ord = children[TaxonomyReader.ROOT_ORDINAL];
-            IList<FacetResult> results = new List<FacetResult>();
+            int ord = m_children[TaxonomyReader.ROOT_ORDINAL];
+            List<FacetResult> results = new List<FacetResult>();
             while (ord != TaxonomyReader.INVALID_ORDINAL)
             {
-                string dim = taxoReader.GetPath(ord).Components[0];
-                DimConfig dimConfig = config.GetDimConfig(dim);
-                if (dimConfig.IndexFieldName.Equals(indexFieldName))
+                string dim = m_taxoReader.GetPath(ord).Components[0];
+                DimConfig dimConfig = m_config.GetDimConfig(dim);
+                if (dimConfig.IndexFieldName.Equals(m_indexFieldName))
                 {
                     FacetResult result = GetTopChildren(topN, dim);
                     if (result != null)
@@ -125,13 +125,12 @@ namespace Lucene.Net.Facet.Taxonomy
                         results.Add(result);
                     }
                 }
-                ord = siblings[ord];
+                ord = m_siblings[ord];
             }
 
             // Sort by highest value, tie break by dim:
-            var resultArray = results.ToList();
-            resultArray.Sort(BY_VALUE_THEN_DIM);
-            return resultArray;
+            results.Sort(BY_VALUE_THEN_DIM);
+            return results;
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Taxonomy/WriterCache/CompactLabelToOrdinal.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/WriterCache/CompactLabelToOrdinal.cs b/src/Lucene.Net.Facet/Taxonomy/WriterCache/CompactLabelToOrdinal.cs
index da3a8fc..01f712a 100644
--- a/src/Lucene.Net.Facet/Taxonomy/WriterCache/CompactLabelToOrdinal.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/WriterCache/CompactLabelToOrdinal.cs
@@ -91,7 +91,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
             Init();
             this.collisionMap = new CollisionMap(this.labelRepository);
 
-            this.counter = 0;
+            this.m_counter = 0;
             this.loadFactor = loadFactor;
 
             this.threshold = (int)(this.loadFactor * this.capacity);
@@ -414,9 +414,9 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
                 // TaxiReader needs to load the "counter" or occupancy (L2O) to know
                 // the next unique facet. we used to load the delimiter too, but
                 // never used it.
-                l2o.counter = dis.ReadInt32();
+                l2o.m_counter = dis.ReadInt32();
 
-                l2o.capacity = DetermineCapacity((int)Math.Pow(2, l2o.hashArrays.Length),
l2o.counter);
+                l2o.capacity = DetermineCapacity((int)Math.Pow(2, l2o.hashArrays.Length),
l2o.m_counter);
                 l2o.Init();
 
                 // now read the chars
@@ -484,7 +484,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
         {
             using (BinaryWriter dos = new BinaryWriter(stream))
             {
-                dos.Write(this.counter);
+                dos.Write(this.m_counter);
 
                 // write the labelRepository
                 this.labelRepository.Flush(dos.BaseStream);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Facet/Taxonomy/WriterCache/LabelToOrdinal.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/WriterCache/LabelToOrdinal.cs b/src/Lucene.Net.Facet/Taxonomy/WriterCache/LabelToOrdinal.cs
index bcb53ad..d284ba9 100644
--- a/src/Lucene.Net.Facet/Taxonomy/WriterCache/LabelToOrdinal.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/WriterCache/LabelToOrdinal.cs
@@ -26,7 +26,7 @@
     {
         /// <summary>
         /// How many ordinals we've seen. </summary>
-        protected internal int counter;
+        protected int m_counter;
 
         /// <summary>
         /// Returned by <see cref="GetOrdinal"/> when the label isn't
@@ -48,7 +48,7 @@
         {
             get
             {
-                return this.counter;
+                return this.m_counter;
             }
         }
 
@@ -58,7 +58,7 @@
         /// </summary>
         public virtual int GetNextOrdinal()
         {
-            return this.counter++;
+            return this.m_counter++;
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Tests.Facet/Range/TestRangeFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Range/TestRangeFacetCounts.cs b/src/Lucene.Net.Tests.Facet/Range/TestRangeFacetCounts.cs
index 2955fff..03d8fa7 100644
--- a/src/Lucene.Net.Tests.Facet/Range/TestRangeFacetCounts.cs
+++ b/src/Lucene.Net.Tests.Facet/Range/TestRangeFacetCounts.cs
@@ -318,7 +318,7 @@ namespace Lucene.Net.Facet.Range
 
                 IDictionary<string, Facets> byDim = new Dictionary<string, Facets>();
                 byDim["field"] = new LongRangeFacetCounts("field", fieldFC, new LongRange("less
than 10", 0L, true, 10L, false), new LongRange("less than or equal to 10", 0L, true, 10L,
true), new LongRange("over 90", 90L, false, 100L, false), new LongRange("90 or above", 90L,
true, 100L, false), new LongRange("over 1000", 1000L, false, long.MaxValue, false));
-                byDim["dim"] = outerInstance.GetTaxonomyFacetCounts(taxoReader, config, dimFC);
+                byDim["dim"] = outerInstance.GetTaxonomyFacetCounts(m_taxoReader, config,
dimFC);
                 return new MultiFacets(byDim, null);
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e4657fbd/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs b/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
index fbd198c..aa0ab31 100644
--- a/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
+++ b/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
@@ -899,12 +899,12 @@ namespace Lucene.Net.Facet
             protected override Facets BuildFacetsResult(FacetsCollector drillDowns, FacetsCollector[]
drillSideways, string[] drillSidewaysDims)
             {
                 IDictionary<string, Facets> drillSidewaysFacets = new Dictionary<string,
Facets>();
-                Facets drillDownFacets = outerInstance.GetTaxonomyFacetCounts(taxoReader,
config, drillDowns);
+                Facets drillDownFacets = outerInstance.GetTaxonomyFacetCounts(m_taxoReader,
config, drillDowns);
                 if (drillSideways != null)
                 {
                     for (int i = 0; i < drillSideways.Length; i++)
                     {
-                        drillSidewaysFacets[drillSidewaysDims[i]] = outerInstance.GetTaxonomyFacetCounts(taxoReader,
config, drillSideways[i]);
+                        drillSidewaysFacets[drillSidewaysDims[i]] = outerInstance.GetTaxonomyFacetCounts(m_taxoReader,
config, drillSideways[i]);
                     }
                 }
 


Mime
View raw message