lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [21/26] lucenenet git commit: dot-netify (change to upper case functions and properties)
Date Fri, 14 Nov 2014 11:59:36 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Range/TestRangeFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Range/TestRangeFacetCounts.cs b/src/Lucene.Net.Tests/core/Facet/Range/TestRangeFacetCounts.cs
index b9e4ef2..aae9008 100644
--- a/src/Lucene.Net.Tests/core/Facet/Range/TestRangeFacetCounts.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Range/TestRangeFacetCounts.cs
@@ -538,14 +538,14 @@ namespace Lucene.Net.Facet.Range
                 ValueSource vs = new LongFieldSource("field");
                 Facets facets = new LongRangeFacetCounts("field", vs, sfc, fastMatchFilter,
ranges);
                 FacetResult result = facets.GetTopChildren(10, "field");
-                Assert.AreEqual(numRange, result.labelValues.Length);
+                Assert.AreEqual(numRange, result.LabelValues.Length);
                 for (int rangeID = 0; rangeID < numRange; rangeID++)
                 {
                     if (VERBOSE)
                     {
                         Console.WriteLine("  range " + rangeID + " expectedCount=" + expectedCounts[rangeID]);
                     }
-                    LabelAndValue subNode = result.labelValues[rangeID];
+                    LabelAndValue subNode = result.LabelValues[rangeID];
                     Assert.AreEqual("r" + rangeID, subNode.label);
                     Assert.AreEqual(expectedCounts[rangeID], (int)subNode.value);
 
@@ -626,11 +626,11 @@ namespace Lucene.Net.Facet.Range
                         DoubleRange prevRange = ranges[Random().Next(rangeID)];
                         if (Random().NextBoolean())
                         {
-                            min = prevRange.min;
+                            min = prevRange.Min;
                         }
                         else
                         {
-                            min = prevRange.max;
+                            min = prevRange.Max;
                         }
                     }
                     else
@@ -644,11 +644,11 @@ namespace Lucene.Net.Facet.Range
                         DoubleRange prevRange = ranges[Random().Next(rangeID)];
                         if (Random().NextBoolean())
                         {
-                            max = prevRange.min;
+                            max = prevRange.Min;
                         }
                         else
                         {
-                            max = prevRange.max;
+                            max = prevRange.Max;
                         }
                     }
                     else
@@ -743,14 +743,14 @@ namespace Lucene.Net.Facet.Range
                 ValueSource vs = new FloatFieldSource("field");
                 Facets facets = new DoubleRangeFacetCounts("field", vs, sfc, fastMatchFilter,
ranges);
                 FacetResult result = facets.GetTopChildren(10, "field");
-                Assert.AreEqual(numRange, result.labelValues.Length);
+                Assert.AreEqual(numRange, result.LabelValues.Length);
                 for (int rangeID = 0; rangeID < numRange; rangeID++)
                 {
                     if (VERBOSE)
                     {
                         Console.WriteLine("TEST: verify range " + rangeID + " expectedCount="
+ expectedCounts[rangeID]);
                     }
-                    LabelAndValue subNode = result.labelValues[rangeID];
+                    LabelAndValue subNode = result.LabelValues[rangeID];
                     Assert.AreEqual("r" + rangeID, subNode.label);
                     Assert.AreEqual(expectedCounts[rangeID], (int)subNode.value);
 
@@ -762,11 +762,11 @@ namespace Lucene.Net.Facet.Range
                     {
                         if (Random().NextBoolean())
                         {
-                            ddq.Add("field", NumericRangeFilter.NewFloatRange("field", (float)range.min,
(float)range.max, range.minInclusive, range.maxInclusive));
+                            ddq.Add("field", NumericRangeFilter.NewFloatRange("field", (float)range.Min,
(float)range.Max, range.MinInclusive, range.MaxInclusive));
                         }
                         else
                         {
-                            ddq.Add("field", NumericRangeQuery.NewFloatRange("field", (float)range.min,
(float)range.max, range.minInclusive, range.maxInclusive));
+                            ddq.Add("field", NumericRangeQuery.NewFloatRange("field", (float)range.Min,
(float)range.Max, range.MinInclusive, range.MaxInclusive));
                         }
                     }
                     else
@@ -827,11 +827,11 @@ namespace Lucene.Net.Facet.Range
                         DoubleRange prevRange = ranges[Random().Next(rangeID)];
                         if (Random().NextBoolean())
                         {
-                            min = prevRange.min;
+                            min = prevRange.Min;
                         }
                         else
                         {
-                            min = prevRange.max;
+                            min = prevRange.Max;
                         }
                     }
                     else
@@ -845,11 +845,11 @@ namespace Lucene.Net.Facet.Range
                         DoubleRange prevRange = ranges[Random().Next(rangeID)];
                         if (Random().NextBoolean())
                         {
-                            max = prevRange.min;
+                            max = prevRange.Min;
                         }
                         else
                         {
-                            max = prevRange.max;
+                            max = prevRange.Max;
                         }
                     }
                     else
@@ -929,14 +929,14 @@ namespace Lucene.Net.Facet.Range
                 ValueSource vs = new DoubleFieldSource("field");
                 Facets facets = new DoubleRangeFacetCounts("field", vs, sfc, fastMatchFilter,
ranges);
                 FacetResult result = facets.GetTopChildren(10, "field");
-                Assert.AreEqual(numRange, result.labelValues.Length);
+                Assert.AreEqual(numRange, result.LabelValues.Length);
                 for (int rangeID = 0; rangeID < numRange; rangeID++)
                 {
                     if (VERBOSE)
                     {
                         Console.WriteLine("  range " + rangeID + " expectedCount=" + expectedCounts[rangeID]);
                     }
-                    LabelAndValue subNode = result.labelValues[rangeID];
+                    LabelAndValue subNode = result.LabelValues[rangeID];
                     Assert.AreEqual("r" + rangeID, subNode.label);
                     Assert.AreEqual(expectedCounts[rangeID], (int)subNode.value);
 
@@ -948,11 +948,11 @@ namespace Lucene.Net.Facet.Range
                     {
                         if (Random().NextBoolean())
                         {
-                            ddq.Add("field", NumericRangeFilter.NewDoubleRange("field", range.min,
range.max, range.minInclusive, range.maxInclusive));
+                            ddq.Add("field", NumericRangeFilter.NewDoubleRange("field", range.Min,
range.Max, range.MinInclusive, range.MaxInclusive));
                         }
                         else
                         {
-                            ddq.Add("field", NumericRangeQuery.NewDoubleRange("field", range.min,
range.max, range.minInclusive, range.maxInclusive));
+                            ddq.Add("field", NumericRangeQuery.NewDoubleRange("field", range.Min,
range.Max, range.MinInclusive, range.MaxInclusive));
                         }
                     }
                     else

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestAddTaxonomy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestAddTaxonomy.cs b/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestAddTaxonomy.cs
index 2ece8ca..df4f491 100644
--- a/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestAddTaxonomy.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestAddTaxonomy.cs
@@ -262,14 +262,14 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
             // now add the taxonomy to an empty taxonomy, while adding the categories
             // again, in parallel -- in the end, no duplicate categories should exist.
             Directory dest = NewDirectory();
-            var destTW = new DirectoryTaxonomyWriter(dest);
-            ThreadClass t = new ThreadAnonymousInnerClassHelper2(this, numCategories, destTW);
+            var destTw = new DirectoryTaxonomyWriter(dest);
+            ThreadClass t = new ThreadAnonymousInnerClassHelper2(this, numCategories, destTw);
             t.Start();
 
             OrdinalMap map = new MemoryOrdinalMap();
-            destTW.AddTaxonomy(src, map);
+            destTw.AddTaxonomy(src, map);
             t.Join();
-            destTW.Dispose();
+            destTw.Dispose();
 
             // now validate
 
@@ -282,7 +282,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
                 FacetLabel cat = dtr.GetPath(i);
                 Assert.True(categories.Add(cat), "category " + cat + " already existed");
             }
-            (dtr).Dispose();
+            dtr.Dispose();
 
             IOUtils.Close(src, dest);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
b/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
index 86dd3a9..5ee17a6 100644
--- a/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
@@ -153,7 +153,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
             {
                 FacetLabel cp = new FacetLabel(FacetsConfig.StringToPath(cat));
                 Assert.True(tr.GetOrdinal(cp) > 0, "category not found " + cp);
-                int level = cp.length;
+                int level = cp.Length;
                 int parentOrd = 0; // for root, parent is always virtual ROOT (ord=0)
                 FacetLabel path = null;
                 for (int i = 0; i < level; i++)
@@ -205,10 +205,10 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
 
                             FacetLabel label = new FacetLabel(ff.dim, ff.path);
                             // add all prefixes to values
-                            int level = label.length;
+                            int level = label.Length;
                             while (level > 0)
                             {
-                                string s = FacetsConfig.PathToString(label.components, level);
+                                string s = FacetsConfig.PathToString(label.Components, level);
                                 values[s] = s;
                                 --level;
                             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
b/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
index d933618..15f30df 100644
--- a/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
@@ -592,8 +592,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
             while (roots.Count > 0)
             {
                 FacetLabel root = taxoReader.GetPath(it.Next());
-                Assert.AreEqual(1, root.length);
-                Assert.True(roots.Remove(root.components[0]));
+                Assert.AreEqual(1, root.Length);
+                Assert.True(roots.Remove(root.Components[0]));
             }
             Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, it.Next());
 
@@ -607,8 +607,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
                 while ((child = it.Next()) != TaxonomyReader.INVALID_ORDINAL)
                 {
                     FacetLabel path = taxoReader.GetPath(child);
-                    Assert.AreEqual(2, path.length);
-                    Assert.AreEqual(path.components[0], i == 0 ? "a" : "b");
+                    Assert.AreEqual(2, path.Length);
+                    Assert.AreEqual(path.Components[0], i == 0 ? "a" : "b");
                     ++numChildren;
                 }
                 int expected = i == 0 ? numA : numB;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
b/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
index ebf5455..f5ddd11 100644
--- a/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
@@ -336,7 +336,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
             {
                 FacetLabel cp = new FacetLabel(FacetsConfig.StringToPath(cat));
                 Assert.True(dtr.GetOrdinal(cp) > 0, "category not found " + cp);
-                int level = cp.length;
+                int level = cp.Length;
                 int parentOrd = 0; // for root, parent is always virtual ROOT (ord=0)
                 FacetLabel path = new FacetLabel();
                 for (int i = 0; i < level; i++)
@@ -380,10 +380,10 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
                         FacetLabel cp = new FacetLabel(Convert.ToString(value / 1000), Convert.ToString(value
/ 10000), Convert.ToString(value / 100000), Convert.ToString(value));
                         int ord = tw.AddCategory(cp);
                         Assert.True(tw.GetParent(ord) != -1, "invalid parent for ordinal
" + ord + ", category " + cp);
-                        string l1 = FacetsConfig.PathToString(cp.components, 1);
-                        string l2 = FacetsConfig.PathToString(cp.components, 2);
-                        string l3 = FacetsConfig.PathToString(cp.components, 3);
-                        string l4 = FacetsConfig.PathToString(cp.components, 4);
+                        string l1 = FacetsConfig.PathToString(cp.Components, 1);
+                        string l2 = FacetsConfig.PathToString(cp.Components, 2);
+                        string l3 = FacetsConfig.PathToString(cp.Components, 3);
+                        string l4 = FacetsConfig.PathToString(cp.Components, 4);
                         values[l1] = l1;
                         values[l2] = l2;
                         values[l3] = l3;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestFacetLabel.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestFacetLabel.cs b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestFacetLabel.cs
index 7f09146..0226137 100644
--- a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestFacetLabel.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestFacetLabel.cs
@@ -32,9 +32,9 @@ namespace Lucene.Net.Facet.Taxonomy
         [Test]
         public virtual void TestBasic()
         {
-            Assert.AreEqual(0, (new FacetLabel()).length);
-            Assert.AreEqual(1, (new FacetLabel("hello")).length);
-            Assert.AreEqual(2, (new FacetLabel("hello", "world")).length);
+            Assert.AreEqual(0, (new FacetLabel()).Length);
+            Assert.AreEqual(1, (new FacetLabel("hello")).Length);
+            Assert.AreEqual(2, (new FacetLabel("hello", "world")).Length);
         }
 
         [Test]
@@ -59,7 +59,7 @@ namespace Lucene.Net.Facet.Taxonomy
             FacetLabel cp = new FacetLabel(components);
             for (int i = 0; i < components.Length; i++)
             {
-                Assert.AreEqual(i, Convert.ToInt32(cp.components[i]));
+                Assert.AreEqual(i, Convert.ToInt32(cp.Components[i]));
             }
         }
 
@@ -71,7 +71,7 @@ namespace Lucene.Net.Facet.Taxonomy
             // If we change this default later, we also need to change this
             // test.
             FacetLabel p = new FacetLabel();
-            Assert.AreEqual(0, p.length);
+            Assert.AreEqual(0, p.Length);
             Assert.AreEqual("FacetLabel: []", p.ToString());
         }
 
@@ -79,18 +79,18 @@ namespace Lucene.Net.Facet.Taxonomy
         public virtual void TestSubPath()
         {
             FacetLabel p = new FacetLabel("hi", "there", "man");
-            Assert.AreEqual(p.length, 3);
+            Assert.AreEqual(p.Length, 3);
 
             FacetLabel p1 = p.Subpath(2);
-            Assert.AreEqual(2, p1.length);
+            Assert.AreEqual(2, p1.Length);
             Assert.AreEqual("FacetLabel: [hi, there]", p1.ToString());
 
             p1 = p.Subpath(1);
-            Assert.AreEqual(1, p1.length);
+            Assert.AreEqual(1, p1.Length);
             Assert.AreEqual("FacetLabel: [hi]", p1.ToString());
 
             p1 = p.Subpath(0);
-            Assert.AreEqual(0, p1.length);
+            Assert.AreEqual(0, p1.Length);
             Assert.AreEqual("FacetLabel: []", p1.ToString());
 
             // with all the following lengths, the prefix should be the whole path 
@@ -98,7 +98,7 @@ namespace Lucene.Net.Facet.Taxonomy
             for (int i = 0; i < lengths.Length; i++)
             {
                 p1 = p.Subpath(lengths[i]);
-                Assert.AreEqual(3, p1.length);
+                Assert.AreEqual(3, p1.Length);
                 Assert.AreEqual("FacetLabel: [hi, there, man]", p1.ToString());
                 Assert.AreEqual(p, p1);
             }
@@ -133,7 +133,7 @@ namespace Lucene.Net.Facet.Taxonomy
         public virtual void TestArrayConstructor()
         {
             FacetLabel p = new FacetLabel("hello", "world", "yo");
-            Assert.AreEqual(3, p.length);
+            Assert.AreEqual(3, p.Length);
             Assert.AreEqual("FacetLabel: [hello, world, yo]", p.ToString());
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestSearcherTaxonomyManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestSearcherTaxonomyManager.cs b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestSearcherTaxonomyManager.cs
index 2d90fe4..dd93d18 100644
--- a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestSearcherTaxonomyManager.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestSearcherTaxonomyManager.cs
@@ -182,8 +182,8 @@ namespace Lucene.Net.Facet.Taxonomy
                         if (pair.searcher.IndexReader.NumDocs > 0)
                         {
                             //System.out.println(pair.taxonomyReader.getSize());
-                            Assert.True(result.childCount > 0);
-                            Assert.True(result.labelValues.Length > 0);
+                            Assert.True(result.ChildCount > 0);
+                            Assert.True(result.LabelValues.Length > 0);
                         }
 
                         //if (VERBOSE) {
@@ -290,8 +290,8 @@ namespace Lucene.Net.Facet.Taxonomy
                         if (pair.searcher.IndexReader.NumDocs > 0)
                         {
                             //System.out.println(pair.taxonomyReader.getSize());
-                            Assert.True(result.childCount > 0);
-                            Assert.True(result.labelValues.Length > 0);
+                            Assert.True(result.ChildCount > 0);
+                            Assert.True(result.LabelValues.Length > 0);
                         }
 
                         //if (VERBOSE) {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyCombined.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyCombined.cs b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyCombined.cs
index ee94742..caf1f09 100644
--- a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyCombined.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyCombined.cs
@@ -141,7 +141,7 @@ namespace Lucene.Net.Facet.Taxonomy
             {
                 return "<null>";
             }
-            if (path.length == 0)
+            if (path.Length == 0)
             {
                 return "<empty>";
             }
@@ -311,7 +311,7 @@ namespace Lucene.Net.Facet.Taxonomy
             tw.Dispose();
             var tr = new DirectoryTaxonomyReader(indexDir);
             Assert.AreEqual(1, tr.Size);
-            Assert.AreEqual(0, tr.GetPath(0).length);
+            Assert.AreEqual(0, tr.GetPath(0).Length);
             Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, tr.ParallelTaxonomyArrays.Parents()[0]);
             Assert.AreEqual(0, tr.GetOrdinal(new FacetLabel()));
             tr.Dispose(true);
@@ -332,7 +332,7 @@ namespace Lucene.Net.Facet.Taxonomy
             tw.Commit();
             var tr = new DirectoryTaxonomyReader(indexDir);
             Assert.AreEqual(1, tr.Size);
-            Assert.AreEqual(0, tr.GetPath(0).length);
+            Assert.AreEqual(0, tr.GetPath(0).Length);
             Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, tr.ParallelTaxonomyArrays.Parents()[0]);
             Assert.AreEqual(0, tr.GetOrdinal(new FacetLabel()));
             tw.Dispose();
@@ -434,7 +434,7 @@ namespace Lucene.Net.Facet.Taxonomy
                     Fail("Parent of " + ordinal + " is " + parentOrdinal + ", but this is
not a valid category.");
                 }
                 // verify that the parent is indeed my parent, according to the strings
-                if (!me.Subpath(me.length - 1).Equals(parent))
+                if (!me.Subpath(me.Length - 1).Equals(parent))
                 {
                     Fail("Got parent " + parentOrdinal + " for ordinal " + ordinal + " but
categories are " + Showcat(parent) + " and " + Showcat(me) + " respectively.");
                 }
@@ -507,7 +507,7 @@ namespace Lucene.Net.Facet.Taxonomy
                 }
                 // verify that the parent is indeed my parent, according to the
                 // strings
-                if (!me.Subpath(me.length - 1).Equals(parent))
+                if (!me.Subpath(me.Length - 1).Equals(parent))
                 {
                     Fail("Got parent " + parentOrdinal + " for ordinal " + ordinal + " but
categories are " + Showcat(parent) + " and " + Showcat(me) + " respectively.");
                 }
@@ -1068,7 +1068,6 @@ namespace Lucene.Net.Facet.Taxonomy
         /// taxonomy index. Calling it after something else was already added to the
         /// taxonomy index will surely have this method fail.
         /// </summary>
-        [Test]
         public static void FillTaxonomyCheckPaths(TaxonomyWriter tw)
         {
             for (int i = 0; i < categories.Length; i++)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetCounts.cs b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetCounts.cs
index b4bb012..8038313 100644
--- a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetCounts.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetCounts.cs
@@ -353,8 +353,8 @@ namespace Lucene.Net.Facet.Taxonomy
             }
 
             FacetResult result = facets.GetTopChildren(10, "a");
-            Assert.AreEqual(1, result.labelValues.Length);
-            Assert.AreEqual(1, (int)result.labelValues[0].value);
+            Assert.AreEqual(1, result.LabelValues.Length);
+            Assert.AreEqual(1, (int)result.LabelValues[0].value);
 
             IOUtils.Close(writer, taxoWriter, searcher.IndexReader, taxoReader, dir, taxoDir);
         }
@@ -431,9 +431,9 @@ namespace Lucene.Net.Facet.Taxonomy
             searcher.Search(new MatchAllDocsQuery(), c);
 
             Facets facets = GetTaxonomyFacetCounts(taxoReader, config, c);
-            Assert.AreEqual(1, facets.GetTopChildren(10, "dim").value);
-            Assert.AreEqual(1, facets.GetTopChildren(10, "dim2").value);
-            Assert.AreEqual(1, facets.GetTopChildren(10, "dim3").value);
+            Assert.AreEqual(1, facets.GetTopChildren(10, "dim").Value);
+            Assert.AreEqual(1, facets.GetTopChildren(10, "dim2").Value);
+            Assert.AreEqual(1, facets.GetTopChildren(10, "dim3").Value);
             try
             {
                 Assert.AreEqual(1, facets.GetSpecificValue("dim"));
@@ -490,9 +490,9 @@ namespace Lucene.Net.Facet.Taxonomy
             Facets facets = GetTaxonomyFacetCounts(taxoReader, config, c);
 
             FacetResult result = facets.GetTopChildren(int.MaxValue, "dim");
-            Assert.AreEqual(numLabels, result.labelValues.Length);
+            Assert.AreEqual(numLabels, result.LabelValues.Length);
             var allLabels = new HashSet<string>();
-            foreach (LabelAndValue labelValue in result.labelValues)
+            foreach (LabelAndValue labelValue in result.LabelValues)
             {
                 allLabels.Add(labelValue.label);
                 Assert.AreEqual(1, (int)labelValue.value);
@@ -582,8 +582,8 @@ namespace Lucene.Net.Facet.Taxonomy
             NewSearcher(r).Search(new MatchAllDocsQuery(), sfc);
             Facets facets1 = GetTaxonomyFacetCounts(taxoReader, config, sfc);
             Facets facets2 = GetTaxonomyFacetCounts(taxoReader, config, sfc, "$b");
-            Assert.AreEqual(r.MaxDoc, (int)facets1.GetTopChildren(10, "a").value);
-            Assert.AreEqual(r.MaxDoc, (int)facets2.GetTopChildren(10, "b").value);
+            Assert.AreEqual(r.MaxDoc, (int)facets1.GetTopChildren(10, "a").Value);
+            Assert.AreEqual(r.MaxDoc, (int)facets2.GetTopChildren(10, "b").Value);
             IOUtils.Close(taxoWriter, iw, taxoReader, taxoDir, r, indexDir);
         }
 
@@ -613,7 +613,7 @@ namespace Lucene.Net.Facet.Taxonomy
             Facets facets = GetTaxonomyFacetCounts(taxoReader, config, sfc);
             foreach (FacetResult result in facets.GetAllDims(10))
             {
-                Assert.AreEqual(r.NumDocs, (int)result.value);
+                Assert.AreEqual(r.NumDocs, (int)result.Value);
             }
 
             IOUtils.Close(taxoWriter, iw, taxoReader, taxoDir, r, indexDir);
@@ -673,7 +673,7 @@ namespace Lucene.Net.Facet.Taxonomy
             NewSearcher(r).Search(new MatchAllDocsQuery(), sfc);
             Facets facets = GetTaxonomyFacetCounts(taxoReader, config, sfc);
 
-            Assert.AreEqual(10, facets.GetTopChildren(2, "a").childCount);
+            Assert.AreEqual(10, facets.GetTopChildren(2, "a").ChildCount);
 
             IOUtils.Close(taxoWriter, iw, taxoReader, taxoDir, r, indexDir);
         }
@@ -733,8 +733,8 @@ namespace Lucene.Net.Facet.Taxonomy
             indexSearcher.Search(q, sfc);
             Facets facets = GetTaxonomyFacetCounts(taxoReader, config, sfc);
             FacetResult result = facets.GetTopChildren(10, "A");
-            Assert.AreEqual(2, result.labelValues.Length, "wrong number of children");
-            foreach (LabelAndValue labelValue in result.labelValues)
+            Assert.AreEqual(2, result.LabelValues.Length, "wrong number of children");
+            foreach (LabelAndValue labelValue in result.LabelValues)
             {
                 Assert.AreEqual(2, (int)labelValue.value, "wrong weight for child " + labelValue.label);
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetCounts2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetCounts2.cs b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetCounts2.cs
index f461dde..865f993 100644
--- a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetCounts2.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetCounts2.cs
@@ -293,14 +293,14 @@ namespace Lucene.Net.Facet.Taxonomy
             searcher.Search(q, sfc);
             Facets facets = GetTaxonomyFacetCounts(taxoReader, Config, sfc);
             FacetResult result = facets.GetTopChildren(NUM_CHILDREN_CP_A, CP_A);
-            Assert.AreEqual(-1, (int)result.value);
-            foreach (LabelAndValue labelValue in result.labelValues)
+            Assert.AreEqual(-1, (int)result.Value);
+            foreach (LabelAndValue labelValue in result.LabelValues)
             {
                 Assert.AreEqual(termExpectedCounts[CP_A + "/" + labelValue.label], labelValue.value);
             }
             result = facets.GetTopChildren(NUM_CHILDREN_CP_B, CP_B);
-            Assert.AreEqual(termExpectedCounts[CP_B], result.value);
-            foreach (LabelAndValue labelValue in result.labelValues)
+            Assert.AreEqual(termExpectedCounts[CP_B], result.Value);
+            foreach (LabelAndValue labelValue in result.LabelValues)
             {
                 Assert.AreEqual(termExpectedCounts[CP_B + "/" + labelValue.label], labelValue.value);
             }
@@ -321,9 +321,9 @@ namespace Lucene.Net.Facet.Taxonomy
             Facets facets = GetTaxonomyFacetCounts(taxoReader, Config, sfc);
 
             FacetResult result = facets.GetTopChildren(NUM_CHILDREN_CP_A, CP_A);
-            Assert.AreEqual(-1, (int)result.value);
+            Assert.AreEqual(-1, (int)result.Value);
             int prevValue = int.MaxValue;
-            foreach (LabelAndValue labelValue in result.labelValues)
+            foreach (LabelAndValue labelValue in result.LabelValues)
             {
                 Assert.AreEqual(allExpectedCounts[CP_A + "/" + labelValue.label], labelValue.value);
                 Assert.True((int)labelValue.value <= prevValue, "wrong sort order of sub
results: labelValue.value=" + labelValue.value + " prevValue=" + prevValue);
@@ -331,9 +331,9 @@ namespace Lucene.Net.Facet.Taxonomy
             }
 
             result = facets.GetTopChildren(NUM_CHILDREN_CP_B, CP_B);
-            Assert.AreEqual(allExpectedCounts[CP_B], result.value);
+            Assert.AreEqual(allExpectedCounts[CP_B], result.Value);
             prevValue = int.MaxValue;
-            foreach (LabelAndValue labelValue in result.labelValues)
+            foreach (LabelAndValue labelValue in result.LabelValues)
             {
                 Assert.AreEqual(allExpectedCounts[CP_B + "/" + labelValue.label], labelValue.value);
                 Assert.True((int)labelValue.value <= prevValue, "wrong sort order of sub
results: labelValue.value=" + labelValue.value + " prevValue=" + prevValue);
@@ -356,14 +356,14 @@ namespace Lucene.Net.Facet.Taxonomy
             Facets facets = GetTaxonomyFacetCounts(taxoReader, Config, sfc);
 
             FacetResult result = facets.GetTopChildren(int.MaxValue, CP_A);
-            Assert.AreEqual(-1, (int)result.value);
-            foreach (LabelAndValue labelValue in result.labelValues)
+            Assert.AreEqual(-1, (int)result.Value);
+            foreach (LabelAndValue labelValue in result.LabelValues)
             {
                 Assert.AreEqual(allExpectedCounts[CP_A + "/" + labelValue.label], labelValue.value);
             }
             result = facets.GetTopChildren(int.MaxValue, CP_B);
-            Assert.AreEqual(allExpectedCounts[CP_B], result.value);
-            foreach (LabelAndValue labelValue in result.labelValues)
+            Assert.AreEqual(allExpectedCounts[CP_B], result.Value);
+            foreach (LabelAndValue labelValue in result.LabelValues)
             {
                 Assert.AreEqual(allExpectedCounts[CP_B + "/" + labelValue.label], labelValue.value);
             }
@@ -384,14 +384,14 @@ namespace Lucene.Net.Facet.Taxonomy
             Facets facets = GetTaxonomyFacetCounts(taxoReader, Config, sfc);
 
             FacetResult result = facets.GetTopChildren(NUM_CHILDREN_CP_C, CP_C);
-            Assert.AreEqual(allExpectedCounts[CP_C], result.value);
-            foreach (LabelAndValue labelValue in result.labelValues)
+            Assert.AreEqual(allExpectedCounts[CP_C], result.Value);
+            foreach (LabelAndValue labelValue in result.LabelValues)
             {
                 Assert.AreEqual(allExpectedCounts[CP_C + "/" + labelValue.label], labelValue.value);
             }
             result = facets.GetTopChildren(NUM_CHILDREN_CP_D, CP_D);
-            Assert.AreEqual(allExpectedCounts[CP_C], result.value);
-            foreach (LabelAndValue labelValue in result.labelValues)
+            Assert.AreEqual(allExpectedCounts[CP_C], result.Value);
+            foreach (LabelAndValue labelValue in result.LabelValues)
             {
                 Assert.AreEqual(allExpectedCounts[CP_D + "/" + labelValue.label], labelValue.value);
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
index f90b9f6..d425a1a 100644
--- a/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
+++ b/src/Lucene.Net.Tests/core/Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
@@ -486,8 +486,8 @@ namespace Lucene.Net.Facet.Taxonomy
             Facets facets1 = GetTaxonomyFacetCounts(taxoReader, config, fc);
             Facets facets2 = new TaxonomyFacetSumValueSource(new DocValuesOrdinalsReader("$b"),
taxoReader, config, fc, new TaxonomyFacetSumValueSource.ScoreValueSource());
 
-            Assert.AreEqual(r.MaxDoc, (int)facets1.GetTopChildren(10, "a").value);
-            Assert.AreEqual(r.MaxDoc, (double)facets2.GetTopChildren(10, "b").value, 1E-10);
+            Assert.AreEqual(r.MaxDoc, (int)facets1.GetTopChildren(10, "a").Value);
+            Assert.AreEqual(r.MaxDoc, (double)facets2.GetTopChildren(10, "b").Value, 1E-10);
             IOUtils.Close(taxoWriter, iw, taxoReader, taxoDir, r, indexDir);
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/TestDrillDownQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/TestDrillDownQuery.cs b/src/Lucene.Net.Tests/core/Facet/TestDrillDownQuery.cs
index 1947b8b..49ce90a 100644
--- a/src/Lucene.Net.Tests/core/Facet/TestDrillDownQuery.cs
+++ b/src/Lucene.Net.Tests/core/Facet/TestDrillDownQuery.cs
@@ -248,11 +248,11 @@ namespace Lucene.Net.Facet
         [Test]
         public virtual void TestTermNonDefault()
         {
-            string aField = config.GetDimConfig("a").indexFieldName;
+            string aField = config.GetDimConfig("a").IndexFieldName;
             Term termA = DrillDownQuery.Term(aField, "a");
             Assert.AreEqual(new Term(aField, "a"), termA);
 
-            string bField = config.GetDimConfig("b").indexFieldName;
+            string bField = config.GetDimConfig("b").IndexFieldName;
             Term termB = DrillDownQuery.Term(bField, "b");
             Assert.AreEqual(new Term(bField, "b"), termB);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/TestDrillSideways.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/TestDrillSideways.cs b/src/Lucene.Net.Tests/core/Facet/TestDrillSideways.cs
index 14b3e12..00cb772 100644
--- a/src/Lucene.Net.Tests/core/Facet/TestDrillSideways.cs
+++ b/src/Lucene.Net.Tests/core/Facet/TestDrillSideways.cs
@@ -312,7 +312,7 @@ namespace Lucene.Net.Facet
 
             // Writes facet ords to a separate directory from the
             // main index:
-            DirectoryTaxonomyWriter taxoWriter = new DirectoryTaxonomyWriter(taxoDir, IndexWriterConfig.OpenMode_e.CREATE);
+            var taxoWriter = new DirectoryTaxonomyWriter(taxoDir, IndexWriterConfig.OpenMode_e.CREATE);
 
             FacetsConfig config = new FacetsConfig();
             config.SetHierarchical("dim", true);
@@ -1211,7 +1211,7 @@ namespace Lucene.Net.Facet
 
                 if (fr != null)
                 {
-                    foreach (LabelAndValue labelValue in fr.labelValues)
+                    foreach (LabelAndValue labelValue in fr.LabelValues)
                     {
                         actualValues[labelValue.label] = (int)labelValue.value;
                         if (VERBOSE)
@@ -1220,7 +1220,7 @@ namespace Lucene.Net.Facet
                             idx++;
                         }
                     }
-                    Assert.AreEqual(expected.UniqueCounts[dim], fr.childCount, "dim=" + dim);
+                    Assert.AreEqual(expected.UniqueCounts[dim], fr.ChildCount, "dim=" + dim);
                 }
 
                 if (topN < dimValues[dim].Length)
@@ -1245,7 +1245,7 @@ namespace Lucene.Net.Facet
 
                     if (fr != null)
                     {
-                        Assert.AreEqual(topNIDs.Length, fr.labelValues.Length);
+                        Assert.AreEqual(topNIDs.Length, fr.LabelValues.Length);
                     }
                     else
                     {
@@ -1254,12 +1254,12 @@ namespace Lucene.Net.Facet
                     for (int i = 0; i < topNIDs.Length; i++)
                     {
                         int expectedOrd = topNIDs[i];
-                        Assert.AreEqual(expected.Counts[dim][expectedOrd], (int)fr.labelValues[i].value);
+                        Assert.AreEqual(expected.Counts[dim][expectedOrd], (int)fr.LabelValues[i].value);
                         if (isSortedSetDV)
                         {
                             // Tie-break facet labels are only in unicode
                             // order with SortedSetDVFacets:
-                            Assert.AreEqual("value @ idx=" + i, dimValues[dim][expectedOrd],
fr.labelValues[i].label);
+                            Assert.AreEqual("value @ idx=" + i, dimValues[dim][expectedOrd],
fr.LabelValues[i].label);
                         }
                     }
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/TestFacetsConfig.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/TestFacetsConfig.cs b/src/Lucene.Net.Tests/core/Facet/TestFacetsConfig.cs
index f9de7c7..9c14f79 100644
--- a/src/Lucene.Net.Tests/core/Facet/TestFacetsConfig.cs
+++ b/src/Lucene.Net.Tests/core/Facet/TestFacetsConfig.cs
@@ -89,8 +89,8 @@ namespace Lucene.Net.Facet
 
             Facets facets = GetTaxonomyFacetCounts(taxoReader, facetsConfig, fc);
             FacetResult res = facets.GetTopChildren(10, "a");
-            Assert.AreEqual(1, res.labelValues.Length);
-            Assert.AreEqual(2, res.labelValues[0].value);
+            Assert.AreEqual(1, res.LabelValues.Length);
+            Assert.AreEqual(2, res.LabelValues[0].value);
             IOUtils.Close(indexReader, taxoReader);
 
             IOUtils.Close(indexDir, taxoDir);
@@ -104,7 +104,7 @@ namespace Lucene.Net.Facet
         {
             FacetsConfig config = new FacetsConfigAnonymousInnerClassHelper(this);
 
-            Assert.True(config.GetDimConfig("foobar").hierarchical);
+            Assert.True(config.GetDimConfig("foobar").Hierarchical);
         }
 
         private class FacetsConfigAnonymousInnerClassHelper : FacetsConfig
@@ -121,7 +121,7 @@ namespace Lucene.Net.Facet
                 get
                 {
                     DimConfig config = new DimConfig();
-                    config.hierarchical = true;
+                    config.Hierarchical = true;
                     return config;
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/TestMultipleIndexFields.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/TestMultipleIndexFields.cs b/src/Lucene.Net.Tests/core/Facet/TestMultipleIndexFields.cs
index 490836b..086e608 100644
--- a/src/Lucene.Net.Tests/core/Facet/TestMultipleIndexFields.cs
+++ b/src/Lucene.Net.Tests/core/Facet/TestMultipleIndexFields.cs
@@ -79,7 +79,7 @@ namespace Lucene.Net.Facet
             // prepare searcher to search against
             IndexSearcher searcher = NewSearcher(ir);
 
-            FacetsCollector sfc = performSearch(tr, ir, searcher);
+            FacetsCollector sfc = PerformSearch(tr, ir, searcher);
 
             // Obtain facets results and hand-test them
             AssertCorrectResults(GetTaxonomyFacetCounts(tr, config, sfc));
@@ -98,7 +98,7 @@ namespace Lucene.Net.Facet
             // create and open an index writer
             RandomIndexWriter iw = new RandomIndexWriter(Random(), indexDir, NewIndexWriterConfig(TEST_VERSION_CURRENT,
new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, false)));
             // create and open a taxonomy writer
-            TaxonomyWriter tw = new DirectoryTaxonomyWriter(taxoDir, OpenMode.CREATE);
+            var tw = new DirectoryTaxonomyWriter(taxoDir, OpenMode.CREATE);
 
             FacetsConfig config = Config;
             config.SetIndexFieldName("Author", "$author");
@@ -113,7 +113,7 @@ namespace Lucene.Net.Facet
             // prepare searcher to search against
             IndexSearcher searcher = NewSearcher(ir);
 
-            FacetsCollector sfc = performSearch(tr, ir, searcher);
+            FacetsCollector sfc = PerformSearch(tr, ir, searcher);
 
             IDictionary<string, Facets> facetsMap = new Dictionary<string, Facets>();
             facetsMap["Author"] = GetTaxonomyFacetCounts(tr, config, sfc, "$author");
@@ -153,7 +153,7 @@ namespace Lucene.Net.Facet
             // prepare searcher to search against
             IndexSearcher searcher = NewSearcher(ir);
 
-            FacetsCollector sfc = performSearch(tr, ir, searcher);
+            FacetsCollector sfc = PerformSearch(tr, ir, searcher);
 
             IDictionary<string, Facets> facetsMap = new Dictionary<string, Facets>();
             Facets facets2 = GetTaxonomyFacetCounts(tr, config, sfc, "$music");
@@ -209,7 +209,7 @@ namespace Lucene.Net.Facet
             // prepare searcher to search against
             IndexSearcher searcher = NewSearcher(ir);
 
-            FacetsCollector sfc = performSearch(tr, ir, searcher);
+            FacetsCollector sfc = PerformSearch(tr, ir, searcher);
 
             IDictionary<string, Facets> facetsMap = new Dictionary<string, Facets>();
             facetsMap["Band"] = GetTaxonomyFacetCounts(tr, config, sfc, "$bands");
@@ -251,7 +251,7 @@ namespace Lucene.Net.Facet
             // prepare searcher to search against
             IndexSearcher searcher = NewSearcher(ir);
 
-            FacetsCollector sfc = performSearch(tr, ir, searcher);
+            FacetsCollector sfc = PerformSearch(tr, ir, searcher);
 
             IDictionary<string, Facets> facetsMap = new Dictionary<string, Facets>();
             Facets facets2 = GetTaxonomyFacetCounts(tr, config, sfc, "$music");
@@ -279,7 +279,7 @@ namespace Lucene.Net.Facet
         }
 
         
-        private static FacetsCollector performSearch(TaxonomyReader tr, IndexReader ir, IndexSearcher
searcher)
+        private static FacetsCollector PerformSearch(TaxonomyReader tr, IndexReader ir, IndexSearcher
searcher)
         {
             FacetsCollector fc = new FacetsCollector();
             FacetsCollector.Search(searcher, new MatchAllDocsQuery(), 10, fc);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f9ee1240/src/Lucene.Net.Tests/core/Facet/TestRandomSamplingFacetsCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Facet/TestRandomSamplingFacetsCollector.cs b/src/Lucene.Net.Tests/core/Facet/TestRandomSamplingFacetsCollector.cs
index 3ada2c5..afd46e5 100644
--- a/src/Lucene.Net.Tests/core/Facet/TestRandomSamplingFacetsCollector.cs
+++ b/src/Lucene.Net.Tests/core/Facet/TestRandomSamplingFacetsCollector.cs
@@ -116,21 +116,21 @@ namespace Lucene.Net.Facet
 
             // we should have five children, but there is a small chance we have less.
             // (see above).
-            Assert.True(random10Result.childCount <= maxNumChildren);
+            Assert.True(random10Result.ChildCount <= maxNumChildren);
             // there should be one child at least.
-            Assert.True(random10Result.childCount >= 1);
+            Assert.True(random10Result.ChildCount >= 1);
 
             // now calculate some statistics to determine if the sampled result is 'ok'.
             // because random sampling is used, the results will vary each time.
             int sum = 0;
-            foreach (LabelAndValue lav in random10Result.labelValues)
+            foreach (LabelAndValue lav in random10Result.LabelValues)
             {
                 sum += (int)lav.value;
             }
             float mu = (float)sum / (float)maxNumChildren;
 
             float variance = 0;
-            foreach (LabelAndValue lav in random10Result.labelValues)
+            foreach (LabelAndValue lav in random10Result.LabelValues)
             {
                 variance += (float)Math.Pow((mu - (int)lav.value), 2);
             }


Mime
View raw message