public abstract class TaxonomyFacets extends Facets
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
children
Maps parent ordinal to its child, or -1 if the parent
is childless.
|
protected FacetsConfig |
config
FacetsConfig provided to the constructor. |
protected java.lang.String |
indexFieldName
Index field name provided to the constructor.
|
protected int[] |
siblings
Maps an ordinal to its sibling, or -1 if there is no
sibling.
|
protected TaxonomyReader |
taxoReader
TaxonomyReader provided to the constructor. |
| Modifier | Constructor and Description |
|---|---|
protected |
TaxonomyFacets(java.lang.String indexFieldName,
TaxonomyReader taxoReader,
FacetsConfig config)
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<FacetResult> |
getAllDims(int topN)
Returns topN labels for any dimension that had hits,
sorted by the number of hits that dimension matched;
this is used for "sparse" faceting, where many
different dimensions were indexed, for example
depending on the type of document.
|
protected FacetsConfig.DimConfig |
verifyDim(java.lang.String dim)
Throws
IllegalArgumentException if the
dimension is not recognized. |
getSpecificValue, getTopChildrenprotected final java.lang.String indexFieldName
protected final TaxonomyReader taxoReader
TaxonomyReader provided to the constructor.protected final FacetsConfig config
FacetsConfig provided to the constructor.protected final int[] children
protected final int[] siblings
protected TaxonomyFacets(java.lang.String indexFieldName,
TaxonomyReader taxoReader,
FacetsConfig config)
throws java.io.IOException
java.io.IOExceptionprotected FacetsConfig.DimConfig verifyDim(java.lang.String dim)
IllegalArgumentException if the
dimension is not recognized. Otherwise, returns the
FacetsConfig.DimConfig for this dimension.public java.util.List<FacetResult> getAllDims(int topN) throws java.io.IOException
FacetsgetAllDims in class Facetsjava.io.IOExceptionCopyright © 2000–2017 The Apache Software Foundation. All rights reserved.