@coveo/headless
    Preparing search index...

    Interface FacetGenerator

    The FacetGenerator headless sub-controller creates commerce facet sub-controllers from the Commerce API search or product listing response.

    Commerce facets are not requested by the implementer, but rather pre-configured through the Coveo Merchandising Hub (CMH). The implementer is only responsible for leveraging the facet controllers created by this sub-controller to properly render facets in their application.

    interface FacetGenerator {
        facets: GeneratedFacetControllers;
        state: string[];
        deselectAll(): void;
        subscribe(listener: () => void): Unsubscribe;
    }

    Hierarchy (View Summary)

    Index

    Methods

    Properties

    Methods

    Properties

    The facet sub-controllers created by the facet generator. Array of RegularFacet, DateRangeFacet, NumericFacet, CategoryFacet, and LocationFacet.

    state: string[]

    The ordered list of facet IDs for which sub-controllers will be created and returned when the facets getter is called.