lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [26/46] lucenenet git commit: Changed Facet.Taxonomy.ParallelTaxonomyArrays methods Parents, Children, and Siblings to be properties.
Date Tue, 04 Oct 2016 20:01:56 GMT
Changed Facet.Taxonomy.ParallelTaxonomyArrays methods Parents, Children, and Siblings to be
properties.


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

Branch: refs/heads/master
Commit: 67b29ee32249c88628db4a8a4ddd1e69cc6a9694
Parents: 0bc3130
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Sep 25 15:31:19 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Mon Oct 3 23:31:34 2016 +0700

----------------------------------------------------------------------
 .../Directory/DirectoryTaxonomyWriter.cs        |  2 +-
 .../Taxonomy/Directory/TaxonomyIndexArrays.cs   | 43 ++++++++++-------
 .../Taxonomy/ParallelTaxonomyArrays.cs          |  6 +--
 src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs |  4 +-
 src/Lucene.Net.Facet/Taxonomy/TaxonomyReader.cs |  4 +-
 .../Directory/TestConcurrentFacetedIndexing.cs  |  2 +-
 .../Directory/TestDirectoryTaxonomyReader.cs    | 10 ++--
 .../Directory/TestDirectoryTaxonomyWriter.cs    |  2 +-
 .../Taxonomy/TestTaxonomyCombined.cs            | 50 ++++++++++----------
 9 files changed, 66 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/67b29ee3/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs
index d25cd1b..b07940e 100644
--- a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs
@@ -886,7 +886,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
                 throw new System.IndexOutOfRangeException("requested ordinal is bigger than
the largest ordinal in the taxonomy");
             }
 
-            int[] parents = TaxoArrays.Parents();
+            int[] parents = TaxoArrays.Parents;
             Debug.Assert(ordinal < parents.Length, "requested ordinal (" + ordinal + ");
parents.length (" + parents.Length + ") !");
             return parents[ordinal];
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/67b29ee3/src/Lucene.Net.Facet/Taxonomy/Directory/TaxonomyIndexArrays.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/Directory/TaxonomyIndexArrays.cs b/src/Lucene.Net.Facet/Taxonomy/Directory/TaxonomyIndexArrays.cs
index ec0b33a..9cbaaed 100644
--- a/src/Lucene.Net.Facet/Taxonomy/Directory/TaxonomyIndexArrays.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/Directory/TaxonomyIndexArrays.cs
@@ -76,7 +76,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
             // it may be caused if e.g. the taxonomy segments were merged, and so an updated
             // NRT reader was obtained, even though nothing was changed. this is not very
likely
             // to happen.
-            int[] copyParents = copyFrom.Parents();
+            int[] copyParents = copyFrom.Parents;
             this.parents = new int[reader.MaxDoc];
             Array.Copy(copyParents, 0, parents, 0, copyParents.Length);
             InitParents(reader, copyParents.Length);
@@ -98,8 +98,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
                     if (copyFrom != null)
                     {
                         // called from the ctor, after we know copyFrom has initialized children/siblings
-                        Array.Copy(copyFrom.Children(), 0, children, 0, copyFrom.Children().Length);
-                        Array.Copy(copyFrom.Siblings(), 0, siblings, 0, copyFrom.Siblings().Length);
+                        Array.Copy(copyFrom.Children, 0, children, 0, copyFrom.Children.Length);
+                        Array.Copy(copyFrom.Siblings, 0, siblings, 0, copyFrom.Siblings.Length);
                         ComputeChildrenSiblings(copyFrom.parents.Length);
                     }
                     else
@@ -207,9 +207,12 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
         /// Returns the parents array, where {@code parents[i]} denotes the parent of
         /// category ordinal {@code i}.
         /// </summary>
-        public override int[] Parents()
+        public override int[] Parents
         {
-            return parents;
+            get
+            {
+                return parents;
+            }
         }
 
         /// <summary>
@@ -218,15 +221,18 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
         /// category that was added last to the taxonomy as an immediate child of
         /// {@code i}.
         /// </summary>
-        public override int[] Children()
+        public override int[] Children
         {
-            if (!initializedChildren)
+            get
             {
-                InitChildrenSiblings(null);
-            }
+                if (!initializedChildren)
+                {
+                    InitChildrenSiblings(null);
+                }
 
-            // the array is guaranteed to be populated
-            return children;
+                // the array is guaranteed to be populated
+                return children;
+            }
         }
 
         /// <summary>
@@ -234,15 +240,18 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
         /// of category ordinal {@code i}. The sibling is defined as the previous
         /// youngest child of {@code parents[i]}.
         /// </summary>
-        public override int[] Siblings()
+        public override int[] Siblings
         {
-            if (!initializedChildren)
+            get
             {
-                InitChildrenSiblings(null);
-            }
+                if (!initializedChildren)
+                {
+                    InitChildrenSiblings(null);
+                }
 
-            // the array is guaranteed to be populated
-            return siblings;
+                // the array is guaranteed to be populated
+                return siblings;
+            }
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/67b29ee3/src/Lucene.Net.Facet/Taxonomy/ParallelTaxonomyArrays.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/ParallelTaxonomyArrays.cs b/src/Lucene.Net.Facet/Taxonomy/ParallelTaxonomyArrays.cs
index 60e351e..1b51568 100644
--- a/src/Lucene.Net.Facet/Taxonomy/ParallelTaxonomyArrays.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/ParallelTaxonomyArrays.cs
@@ -52,18 +52,18 @@
         /// Returns the parents array, where {@code parents[i]} denotes the parent of
         /// category ordinal {@code i}.
         /// </summary>
-        public abstract int[] Parents();
+        public abstract int[] Parents { get; }
 
         /// <summary>
         /// Returns the children array, where {@code children[i]} denotes a child of
         /// category ordinal {@code i}.
         /// </summary>
-        public abstract int[] Children();
+        public abstract int[] Children { get; }
 
         /// <summary>
         /// Returns the siblings array, where {@code siblings[i]} denotes the sibling
         /// of category ordinal {@code i}.
         /// </summary>
-        public abstract int[] Siblings();
+        public abstract int[] Siblings { get; }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/67b29ee3/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 51a073f..ef8dede 100644
--- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs
@@ -86,8 +86,8 @@ namespace Lucene.Net.Facet.Taxonomy
             this.taxoReader = taxoReader;
             this.config = config;
             ParallelTaxonomyArrays pta = taxoReader.ParallelTaxonomyArrays;
-            children = pta.Children();
-            siblings = pta.Siblings();
+            children = pta.Children;
+            siblings = pta.Siblings;
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/67b29ee3/src/Lucene.Net.Facet/Taxonomy/TaxonomyReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyReader.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyReader.cs
index 4dc391e..e99b011 100644
--- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyReader.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyReader.cs
@@ -221,8 +221,8 @@ namespace Lucene.Net.Facet.Taxonomy
         public virtual ChildrenIterator GetChildren(int ordinal)
         {
             ParallelTaxonomyArrays arrays = ParallelTaxonomyArrays;
-            int child = ordinal >= 0 ? arrays.Children()[ordinal] : INVALID_ORDINAL;
-            return new ChildrenIterator(child, arrays.Siblings());
+            int child = ordinal >= 0 ? arrays.Children[ordinal] : INVALID_ORDINAL;
+            return new ChildrenIterator(child, arrays.Siblings);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/67b29ee3/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
index 8c36649..52a4d61 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestConcurrentFacetedIndexing.cs
@@ -148,7 +148,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
                 }
                 Fail("mismatch number of categories");
             }
-            int[] parents = tr.ParallelTaxonomyArrays.Parents();
+            int[] parents = tr.ParallelTaxonomyArrays.Parents;
             foreach (string cat in values.Keys)
             {
                 FacetLabel cp = new FacetLabel(FacetsConfig.StringToPath(cat));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/67b29ee3/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
index d0801dd..0e2935a 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
@@ -253,7 +253,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
                 // assert categories
                 Assert.AreEqual(numCategories, reader.Size);
                 int roundOrdinal = reader.GetOrdinal(new FacetLabel(Convert.ToString(i)));
-                int[] parents = reader.ParallelTaxonomyArrays.Parents();
+                int[] parents = reader.ParallelTaxonomyArrays.Parents;
                 Assert.AreEqual(0, parents[roundOrdinal]); // round's parent is root
                 for (int j = 0; j < numCats; j++)
                 {
@@ -306,7 +306,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
 
             var reader = new DirectoryTaxonomyReader(writer);
             Assert.AreEqual(1, reader.Size);
-            Assert.AreEqual(1, reader.ParallelTaxonomyArrays.Parents().Length);
+            Assert.AreEqual(1, reader.ParallelTaxonomyArrays.Parents.Length);
 
             // add category and call forceMerge -- this should flush IW and merge segments
down to 1
             // in ParentArray.initFromReader, this used to fail assuming there are no parents.
@@ -319,7 +319,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
             reader.Dispose();
             reader = newtr;
             Assert.AreEqual(2, reader.Size);
-            Assert.AreEqual(2, reader.ParallelTaxonomyArrays.Parents().Length);
+            Assert.AreEqual(2, reader.ParallelTaxonomyArrays.Parents.Length);
 
             reader.Dispose();
             writer.Dispose();
@@ -367,7 +367,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
 
             var reader = new DirectoryTaxonomyReader(writer);
             Assert.AreEqual(2, reader.Size);
-            Assert.AreEqual(2, reader.ParallelTaxonomyArrays.Parents().Length);
+            Assert.AreEqual(2, reader.ParallelTaxonomyArrays.Parents.Length);
 
             // merge all the segments so that NRT reader thinks there's a change 
             iw.ForceMerge(1);
@@ -378,7 +378,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
             reader.Dispose();
             reader = newtr;
             Assert.AreEqual(2, reader.Size);
-            Assert.AreEqual(2, reader.ParallelTaxonomyArrays.Parents().Length);
+            Assert.AreEqual(2, reader.ParallelTaxonomyArrays.Parents.Length);
 
             reader.Dispose();
             writer.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/67b29ee3/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
index 8924f56..778a889 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
@@ -325,7 +325,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
                 Fail("mismatch number of categories");
             }
 
-            int[] parents = dtr.ParallelTaxonomyArrays.Parents();
+            int[] parents = dtr.ParallelTaxonomyArrays.Parents;
             foreach (string cat in values.Keys)
             {
                 FacetLabel cp = new FacetLabel(FacetsConfig.StringToPath(cat));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/67b29ee3/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs
index 9290ec2..70080ec 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs
@@ -312,7 +312,7 @@ namespace Lucene.Net.Facet.Taxonomy
             var tr = new DirectoryTaxonomyReader(indexDir);
             Assert.AreEqual(1, tr.Size);
             Assert.AreEqual(0, tr.GetPath(0).Length);
-            Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, tr.ParallelTaxonomyArrays.Parents()[0]);
+            Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, tr.ParallelTaxonomyArrays.Parents[0]);
             Assert.AreEqual(0, tr.GetOrdinal(new FacetLabel()));
             tr.Dispose(true);
             indexDir.Dispose();
@@ -333,7 +333,7 @@ namespace Lucene.Net.Facet.Taxonomy
             var tr = new DirectoryTaxonomyReader(indexDir);
             Assert.AreEqual(1, tr.Size);
             Assert.AreEqual(0, tr.GetPath(0).Length);
-            Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, tr.ParallelTaxonomyArrays.Parents()[0]);
+            Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, tr.ParallelTaxonomyArrays.Parents[0]);
             Assert.AreEqual(0, tr.GetOrdinal(new FacetLabel()));
             tw.Dispose();
             tr.Dispose(true);
@@ -420,7 +420,7 @@ namespace Lucene.Net.Facet.Taxonomy
             var tr = new DirectoryTaxonomyReader(indexDir);
 
             // check that the parent of the root ordinal is the invalid ordinal:
-            int[] parents = tr.ParallelTaxonomyArrays.Parents();
+            int[] parents = tr.ParallelTaxonomyArrays.Parents;
             Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, parents[0]);
 
             // check parent of non-root ordinals:
@@ -557,9 +557,9 @@ namespace Lucene.Net.Facet.Taxonomy
             tw.Dispose();
             var tr = new DirectoryTaxonomyReader(indexDir);
             ParallelTaxonomyArrays ca = tr.ParallelTaxonomyArrays;
-            int[] youngestChildArray = ca.Children();
+            int[] youngestChildArray = ca.Children;
             Assert.AreEqual(tr.Size, youngestChildArray.Length);
-            int[] olderSiblingArray = ca.Siblings();
+            int[] olderSiblingArray = ca.Siblings;
             Assert.AreEqual(tr.Size, olderSiblingArray.Length);
             for (int i = 0; i < ExpectedCategories.Length; i++)
             {
@@ -630,13 +630,13 @@ namespace Lucene.Net.Facet.Taxonomy
             tw.Dispose();
             var tr = new DirectoryTaxonomyReader(indexDir);
             ParallelTaxonomyArrays ca = tr.ParallelTaxonomyArrays;
-            int[] children = ca.Children();
+            int[] children = ca.Children;
             Assert.AreEqual(tr.Size, children.Length);
-            int[] olderSiblingArray = ca.Siblings();
+            int[] olderSiblingArray = ca.Siblings;
             Assert.AreEqual(tr.Size, olderSiblingArray.Length);
 
             // test that the "youngest child" of every category is indeed a child:
-            int[] parents = tr.ParallelTaxonomyArrays.Parents();
+            int[] parents = tr.ParallelTaxonomyArrays.Parents;
             for (int i = 0; i < tr.Size; i++)
             {
                 int youngestChild = children[i];
@@ -726,10 +726,10 @@ namespace Lucene.Net.Facet.Taxonomy
             var tr = new DirectoryTaxonomyReader(indexDir);
             ParallelTaxonomyArrays ca = tr.ParallelTaxonomyArrays;
             Assert.AreEqual(3, tr.Size);
-            Assert.AreEqual(3, ca.Siblings().Length);
-            Assert.AreEqual(3, ca.Children().Length);
-            Assert.True(Arrays.Equals(new int[] { 1, 2, -1 }, ca.Children()));
-            Assert.True(Arrays.Equals(new int[] { -1, -1, -1 }, ca.Siblings()));
+            Assert.AreEqual(3, ca.Siblings.Length);
+            Assert.AreEqual(3, ca.Children.Length);
+            Assert.True(Arrays.Equals(new int[] { 1, 2, -1 }, ca.Children));
+            Assert.True(Arrays.Equals(new int[] { -1, -1, -1 }, ca.Siblings));
             tw.AddCategory(new FacetLabel("hi", "ho"));
             tw.AddCategory(new FacetLabel("hello"));
             tw.Commit();
@@ -737,8 +737,8 @@ namespace Lucene.Net.Facet.Taxonomy
             ParallelTaxonomyArrays newca = tr.ParallelTaxonomyArrays;
             Assert.AreSame(newca, ca); // we got exactly the same object
             Assert.AreEqual(3, tr.Size);
-            Assert.AreEqual(3, ca.Siblings().Length);
-            Assert.AreEqual(3, ca.Children().Length);
+            Assert.AreEqual(3, ca.Siblings.Length);
+            Assert.AreEqual(3, ca.Children.Length);
             // After the refresh, things change:
             var newtr = TaxonomyReader.OpenIfChanged(tr);
             Assert.NotNull(newtr);
@@ -746,10 +746,10 @@ namespace Lucene.Net.Facet.Taxonomy
             tr = newtr;
             ca = tr.ParallelTaxonomyArrays;
             Assert.AreEqual(5, tr.Size);
-            Assert.AreEqual(5, ca.Siblings().Length);
-            Assert.AreEqual(5, ca.Children().Length);
-            Assert.True(Arrays.Equals(new int[] { 4, 3, -1, -1, -1 }, ca.Children()));
-            Assert.True(Arrays.Equals(new int[] { -1, -1, -1, 2, 1 }, ca.Siblings()));
+            Assert.AreEqual(5, ca.Siblings.Length);
+            Assert.AreEqual(5, ca.Children.Length);
+            Assert.True(Arrays.Equals(new int[] { 4, 3, -1, -1, -1 }, ca.Children));
+            Assert.True(Arrays.Equals(new int[] { -1, -1, -1, 2, 1 }, ca.Siblings));
             tw.Dispose();
             tr.Dispose();
             indexDir.Dispose();
@@ -771,7 +771,7 @@ namespace Lucene.Net.Facet.Taxonomy
             ParallelTaxonomyArrays ca1 = trBase.ParallelTaxonomyArrays;
 
             int abOrd = trBase.GetOrdinal(abPath);
-            int abYoungChildBase1 = ca1.Children()[abOrd];
+            int abYoungChildBase1 = ca1.Children[abOrd];
 
             int numCategories = AtLeast(800);
             for (int i = 0; i < numCategories; i++)
@@ -786,7 +786,7 @@ namespace Lucene.Net.Facet.Taxonomy
             trBase = newTaxoReader;
 
             ParallelTaxonomyArrays ca2 = trBase.ParallelTaxonomyArrays;
-            int abYoungChildBase2 = ca2.Children()[abOrd];
+            int abYoungChildBase2 = ca2.Children[abOrd];
 
             int numRetries = AtLeast(50);
             for (int retry = 0; retry < numRetries; retry++)
@@ -875,7 +875,7 @@ namespace Lucene.Net.Facet.Taxonomy
                 {
                     while (!stop.Get())
                     {
-                        int lastOrd = tr.ParallelTaxonomyArrays.Parents().Length - 1;
+                        int lastOrd = tr.ParallelTaxonomyArrays.Parents.Length - 1;
                         Assert.NotNull(tr.GetPath(lastOrd), "path of last-ord " + lastOrd
+ " is not found!");
                         AssertChildrenArrays(tr.ParallelTaxonomyArrays, retry, retrieval[0]++);
                         Thread.Sleep(10);// don't starve refresh()'s CPU, which sleeps every
50 bytes for 1 ms
@@ -890,8 +890,8 @@ namespace Lucene.Net.Facet.Taxonomy
 
             private void AssertChildrenArrays(ParallelTaxonomyArrays ca, int retry, int retrieval)
             {
-                int abYoungChild = ca.Children()[abOrd];
-                Assert.True(abYoungChildBase1 == abYoungChild || abYoungChildBase2 == ca.Children()[abOrd],
"Retry " + retry + ": retrieval: " + retrieval + ": wrong youngest child for category " +
abPath + " (ord=" + abOrd + ") - must be either " + abYoungChildBase1 + " or " + abYoungChildBase2
+ " but was: " + abYoungChild);
+                int abYoungChild = ca.Children[abOrd];
+                Assert.True(abYoungChildBase1 == abYoungChild || abYoungChildBase2 == ca.Children[abOrd],
"Retry " + retry + ": retrieval: " + retrieval + ": wrong youngest child for category " +
abPath + " (ord=" + abOrd + ") - must be either " + abYoungChildBase1 + " or " + abYoungChildBase2
+ " but was: " + abYoungChild);
             }
         }
 
@@ -949,7 +949,7 @@ namespace Lucene.Net.Facet.Taxonomy
             int author = 1;
             try
             {
-                Assert.AreEqual(TaxonomyReader.ROOT_ORDINAL, tr.ParallelTaxonomyArrays.Parents()[author]);
+                Assert.AreEqual(TaxonomyReader.ROOT_ORDINAL, tr.ParallelTaxonomyArrays.Parents[author]);
                 // ok
             }
             catch (System.IndexOutOfRangeException)
@@ -969,7 +969,7 @@ namespace Lucene.Net.Facet.Taxonomy
             Assert.NotNull(newTaxoReader);
             tr.Dispose();
             tr = newTaxoReader;
-            int[] parents = tr.ParallelTaxonomyArrays.Parents();
+            int[] parents = tr.ParallelTaxonomyArrays.Parents;
             Assert.AreEqual(author, parents[dawkins]);
             Assert.AreEqual(TaxonomyReader.ROOT_ORDINAL, parents[author]);
             Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, parents[TaxonomyReader.ROOT_ORDINAL]);


Mime
View raw message