public interface FacetResultNode
Modifier and Type | Method and Description |
---|---|
CategoryPath |
getLabel()
Category path of the category of this result, or null if not computed,
because the application did not request to compute it.
|
CategoryPath |
getLabel(TaxonomyReader taxonomyReader)
Category path of the category of this result.
|
int |
getNumSubResults()
Number of sub results
|
int |
getOrdinal()
Ordinal of the category of this result.
|
double |
getResidue()
Value of screened out sub results.
|
Iterable<? extends FacetResultNode> |
getSubResults()
Contained sub results.
|
double |
getValue()
Value of this result - usually either count or a value derived from some
computing on the association of it.
|
void |
setValue(double value)
Expert: Set a new value for this result node.
|
String |
toString(String prefix)
String representation of this facet result node.
|
String toString(String prefix)
prefix
- prefix for each result lineint getOrdinal()
CategoryPath getLabel()
getLabel(TaxonomyReader)
.CategoryPath getLabel(TaxonomyReader taxonomyReader) throws IOException
Use with caution: loading a label for results is costly, performance wise. Therefore force labels loading only when really needed.
taxonomyReader
- taxonomy reader for forcing (lazy) labeling of this result.IOException
- on errorFacetRequest.getNumLabel()
double getValue()
double getResidue()
If only part of valid results are returned, e.g. because top K were requested, provide info on "what else is there under this result node".
Iterable<? extends FacetResultNode> getSubResults()
int getNumSubResults()
void setValue(double value)
Allows to modify the value of this facet node.
Used for example to tune a sampled value, e.g. by
SampleFixer.fixResult(org.apache.lucene.facet.search.ScoredDocIDs, FacetResult)
value
- the new value to setgetValue()
,
FacetResultsHandler.rearrangeFacetResult(FacetResult)