FacetResult (Lucene 10.5.0 facet API)
Description: declaration: package: org.apache.lucene.facet, class: FacetResult

Package org.apache.lucene.facet

# Class FacetResult

java.lang.Object
org.apache.lucene.facet.FacetResult

public final class FacetResult extends Object
Counts or aggregates for a single dimension.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final int`
  `childCount`
  How many child labels were encountered.
  `final String`
  `dim`
  Dimension that was requested.
  `final LabelAndValue[]`
  `labelValues`
  Child counts.
  `final String[]`
  `path`
  Path whose children were requested.
  `final Number`
  `value`
  Total number of documents containing a value for this path, even those not included in the topN.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FacetResult(String dim, String[] path, Number value, LabelAndValue[] labelValues, int childCount)`
  Sole constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object _other)`
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### dim

    public final String dim
    Dimension that was requested.

  - ### path

    public final String[] path
    Path whose children were requested.

  - ### value

    public final Number value
    Total number of documents containing a value for this path, even those not included in the topN. If a document contains multiple values for the same path, it will only be counted once in this value.

  - ### childCount

    public final int childCount
    How many child labels were encountered.

  - ### labelValues

    public final LabelAndValue[] labelValues
    Child counts.

- ## Constructor Details

  - ### FacetResult

    public FacetResult(String dim, String[] path, Number value, LabelAndValue[] labelValues, int childCount)
    Sole constructor.

- ## Method Details

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### equals

    public boolean equals(Object _other)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`