|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.facet.search.FacetResultNode
public class FacetResultNode
Result of faceted search for a certain taxonomy node. This class serves as a
bin of different attributes of the result node, such as its ordinal
as well as label
. You are not expected to modify those values.
This class implements Comparable
for easy comparisons of result
nodes, e.g. when sorting or computing top-K nodes.
Field Summary | |
---|---|
static List<FacetResultNode> |
EMPTY_SUB_RESULTS
|
CategoryPath |
label
The label of this result. |
int |
ordinal
The category ordinal of this node. |
List<FacetResultNode> |
subResults
The sub-results of this result. |
double |
value
The value of this result. |
Constructor Summary | |
---|---|
FacetResultNode(int ordinal,
double value)
|
Method Summary | |
---|---|
int |
compareTo(FacetResultNode o)
|
String |
toString()
|
String |
toString(String prefix)
Returns a String representation of this facet result node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final List<FacetResultNode> EMPTY_SUB_RESULTS
public int ordinal
public CategoryPath label
label
of this result. May be null
if not
computed, in which case use TaxonomyReader.getPath(int)
to label
it.
NOTE: by default, all nodes are labeled. Only when
FacetRequest.getNumLabel()
<
FacetRequest.numResults
there will be unlabeled nodes.
public double value
FacetRequest
used (e.g. in case of CountFacetRequest
it is
int
).
public List<FacetResultNode> subResults
FacetRequest.getResultMode()
is
FacetRequest.ResultMode.PER_NODE_IN_TREE
, every sub result denotes an immediate
child of this node. Otherwise, it is a descendant of any level.
NOTE: this member should not be null
. To denote that a
result does not have sub results, set it to EMPTY_SUB_RESULTS
(or
don't modify it).
Constructor Detail |
---|
public FacetResultNode(int ordinal, double value)
Method Detail |
---|
public int compareTo(FacetResultNode o)
compareTo
in interface Comparable<FacetResultNode>
public String toString()
toString
in class Object
public String toString(String prefix)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |