Package org.apache.lucene.facet.taxonomy
Class ParallelTaxonomyArrays
java.lang.Object
org.apache.lucene.facet.taxonomy.ParallelTaxonomyArrays
Returns 3 arrays for traversing the taxonomy:
parents:parents[i]denotes the parent of category ordinali.children:children[i]denotes a child of category ordinali.siblings:siblings[i]denotes the sibling of category ordinali.
children[0] (ordinal 0 is
reserved for ROOT), and then depends if you want to do DFS or BFS, you call
children[children[0]] or siblings[children[0]] and so forth, respectively.
NOTE: you are not expected to modify the values of the arrays, since the arrays are shared with other threads.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int[]children()Returns the children array, wherechildren[i]denotes a child of category ordinali.abstract int[]parents()Returns the parents array, whereparents[i]denotes the parent of category ordinali.abstract int[]siblings()Returns the siblings array, wheresiblings[i]denotes the sibling of category ordinali.
-
Constructor Details
-
ParallelTaxonomyArrays
public ParallelTaxonomyArrays()Sole constructor.
-
-
Method Details
-
parents
public abstract int[] parents()Returns the parents array, whereparents[i]denotes the parent of category ordinali. -
children
public abstract int[] children()Returns the children array, wherechildren[i]denotes a child of category ordinali. -
siblings
public abstract int[] siblings()Returns the siblings array, wheresiblings[i]denotes the sibling of category ordinali.
-