interface TermFacetResult {
    dataType: TermFacetResultType;
    missing: number;
    other: number;
    terms: FacetTerm[];
    total: number;
    type: "terms";
}

Hierarchy (View Summary)

Properties

Data type to which the facet is applied.

missing: number

Number of ProductVariants that have no value for the specified term facet expression.

other: number

Number of terms not represented in this object (such as the number of terms beyond the limit).

terms: FacetTerm[]

Values for the field specified in term facet expression for which at least one ProductVariant could be found.

By default, facet terms are returned in a descending order of their `count`.

If the term facet expression specifies to count [Products](ctp:api:type:Product) through the `counting products` [extension](/projects/product-projection-search#counting-products), then facet terms are returned in a descending order of their `productCount`.
total: number

Number of terms matching the term facet expression.

- If the expression refers to Product fields like `categories.id` and `reviewRatingStatistics.count`, the value represents the number of Products.
- If the expression is defined for fields specific to Product Variants, for example, `variants.attributes.{name}`, the value represents the number of Product Variants matching the expression.
type: "terms"