The AutomaticFacetGenerator headless controller offers a high-level interface for rendering automatic facets.

Unlike regular facets that need to be explicitly defined and requested in the query, automatic facets are dynamically generated by the index in response to the query.

To learn more about the automatic facet generator feature, see: About the Facet Generator.

Examples:

interface AutomaticFacetGenerator {
    state: AutomaticFacetGeneratorState;
    subscribe(listener: () => void): Unsubscribe;
}

Hierarchy (View Summary)

Methods

Properties

Methods

  • Adds a callback that's invoked on state change.

    Parameters

    • listener: () => void

      A callback that's invoked on state change.

    Returns Unsubscribe

    A function to remove the listener.

Properties

The state of the AutomaticFacetGenerator controller.