FacetResultNode (Lucene 3.6.2 API)
Keywords: org.apache.lucene.facet.search.results.FacetResultNode interface

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

## org.apache.lucene.facet.search.results
Interface FacetResultNode

All Known Implementing Classes:
  MutableFacetResultNode

    public interface FacetResultNode

Result of faceted search for a certain taxonomy node.

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

Method Summary
`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.

Method Detail

### toString

    String toString(String prefix)

  String representation of this facet result node. Use with caution: might return a very long string.

  Parameters:
    `prefix` - prefix for each result line

### getOrdinal

    int getOrdinal()

  Ordinal of the category of this result.

### getLabel

    CategoryPath getLabel()

  Category path of the category of this result, or null if not computed, because the application did not request to compute it. To force computing the label in case not yet computed use `getLabel(TaxonomyReader)`.

  See Also:
    `FacetRequest.getNumLabel()`, `getLabel(TaxonomyReader)`

### getLabel

    CategoryPath getLabel(TaxonomyReader taxonomyReader)
                          throws IOException

  Category path of the category of this result. If not already computed, will be computed now.

  Use with caution: loading a label for results is costly, performance wise. Therefore force labels loading only when really needed.

  Parameters:
    `taxonomyReader` - taxonomy reader for forcing (lazy) labeling of this result.
  Throws:
    `IOException` - on error
  See Also:
    `FacetRequest.getNumLabel()`

### getValue

    double getValue()

  Value of this result - usually either count or a value derived from some computing on the association of it.

### getResidue

    double getResidue()

  Value of screened out sub results.

  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".

### getSubResults

    Iterable<? extends FacetResultNode> getSubResults()

  Contained sub results. These are either child facets, if a tree result was requested, or simply descendants, in case tree result was not requested. In the first case, all returned are both descendants of this node in the taxonomy and siblings of each other in the taxonomy. In the latter case they are only guaranteed to be descendants of this node in the taxonomy.

### getNumSubResults

    int getNumSubResults()

  Number of sub results

### setValue

    void setValue(double value)

  Expert: Set a new value for this result node.

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

  Parameters:
    `value` - the new value to set
  See Also:
    `getValue()`, `FacetResultsHandler.rearrangeFacetResult(FacetResult)`

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