Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.facet.search
Class FacetResultNode

    java.lang.Object
      org.apache.lucene.facet.search.FacetResultNode

    public class FacetResultNode

extends Object

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.

WARNING: This API is experimental and might change in incompatible ways in the next release.

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
`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

### EMPTY_SUB_RESULTS

    public static final List<FacetResultNode> EMPTY_SUB_RESULTS

### ordinal

    public int ordinal

  The category ordinal of this node.

### label

    public CategoryPath label

  The `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.

### value

    public double value

  The value of this result. Its actual type depends on the `FacetRequest` used (e.g. in case of `CountFacetRequest` it is `int`).

### subResults

    public List<FacetResultNode> subResults

  The sub-results of this result. If `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

### FacetResultNode

    public FacetResultNode(int ordinal,
                           double value)

Method Detail

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### toString

    public String toString(String prefix)

  Returns a String representation of this facet result node.

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.