Class FacetResponse.Field

java.lang.Object
org.codelibs.fess.util.FacetResponse.Field
Enclosing class:
FacetResponse

public static class FacetResponse.Field extends Object
Represents a field facet with its name and value counts. Each field facet contains multiple values with their respective document counts.
  • Field Details

    • valueCountMap

      protected Map<String,Long> valueCountMap
      Map containing field values and their document counts. Keys are field values as strings, values are document counts.
    • name

      protected String name
      The decoded name of the field.
  • Constructor Details

    • Field

      public Field(org.opensearch.search.aggregations.bucket.terms.Terms termFacet)
      Constructs a Field from OpenSearch Terms aggregation. Decodes the field name and processes all term buckets to extract field values and their document counts.
      Parameters:
      termFacet - the OpenSearch Terms aggregation containing field facet data
  • Method Details

    • getValueCountMap

      public Map<String,Long> getValueCountMap()
      Gets the map of field values and their document counts.
      Returns:
      the valueCountMap containing field values and counts
    • getName

      public String getName()
      Gets the decoded name of this field facet.
      Returns:
      the field name