The FieldSuggestions controller provides query suggestions based on a particular facet field.

For example, you could use this controller to provide auto-completion suggestions while the end user is typing an item title.

This controller is a wrapper around the basic facet controller search functionality, and thus exposes similar options and properties.

interface FieldSuggestions {
    state: FieldSuggestionsState;
    type: "regular";
    clear(): void;
    search(): void;
    select(value: BaseFacetSearchResult): void;
    singleSelect(value: BaseFacetSearchResult): void;
    subscribe(listener: () => void): Unsubscribe;
    updateText(text: string): void;
}

Hierarchy (View Summary)

  • Controller
  • FacetControllerType<"regular">
    • FieldSuggestions

Methods

Properties

type: "regular"