Package org.apache.lucene.facet
Class Facets
- java.lang.Object
-
- org.apache.lucene.facet.Facets
-
- Direct Known Subclasses:
DoubleRangeFacetCounts
,LongRangeFacetCounts
,MultiFacets
,SortedSetDocValuesFacetCounts
,TaxonomyFacets
public abstract class Facets extends java.lang.Object
Common base class for all facets implementations.
-
-
Constructor Summary
Constructors Constructor Description Facets()
Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract 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.abstract java.lang.Number
getSpecificValue(java.lang.String dim, java.lang.String... path)
Return the count or value for a specific path.abstract FacetResult
getTopChildren(int topN, java.lang.String dim, java.lang.String... path)
Returns the topN child labels under the specified path.
-
-
-
Method Detail
-
getTopChildren
public abstract FacetResult getTopChildren(int topN, java.lang.String dim, java.lang.String... path) throws java.io.IOException
Returns the topN child labels under the specified path. Returns null if the specified path doesn't exist or if this dimension was never seen.- Throws:
java.io.IOException
-
getSpecificValue
public abstract java.lang.Number getSpecificValue(java.lang.String dim, java.lang.String... path) throws java.io.IOException
Return the count or value for a specific path. Returns -1 if this path doesn't exist, else the count.- Throws:
java.io.IOException
-
getAllDims
public abstract java.util.List<FacetResult> getAllDims(int topN) throws java.io.IOException
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.- Throws:
java.io.IOException
-
-