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 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​(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