Support Menu

Class QueryController

This class is automatically instantiated and bound to the root of your search interface when you initialize the framework.
It is essentially a singleton that wraps the access to the SearchEndpoint endpoint to execute query, and is in charge of triggering the different query events.
This is what every component of the framework uses internally to execute query or access the endpoint.
When calling Coveo.executeQuery this class is used.

Index

Methods

cancelQuery

  • cancelQuery(): void

debugInfo

  • debugInfo(): any

disable

  • disable(): void
  • Disable the component. Normally this means that the component will not execute handlers for the framework events (query events, for example). Component are enabled by default on creation.

    Returns void

enable

  • enable(): void
  • Enable the component. Normally this means that the component will execute handlers for the framework events (query events, for example). Components are enabled by default on creation.

    Returns void

executeQuery

  • Execute a query and return a Promise of IQueryResults.
    This will execute the normal query flow, triggering all the necessary query events (newQuery
    All components present in the interface will act accordingly (modify the query and render results if needed).

    Parameters

    Returns Promise<IQueryResults>

fetchMore

getEndpoint

  • getEndpoint(): ISearchEndpoint

getLastQuery

getLastResults

setEndpoint

Properties

disabled

disabled: boolean

A disabled component will not participate in the query, or listen to ComponentEvents.

type

{boolean}

logger

logger: Logger

Allows component to log in the dev console.

Static ID

ID: string

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

Constructors

constructor

  • new QueryController(element: HTMLElement, options: ISearchInterfaceOptions, usageAnalytics: any, searchInterface: any): QueryController

Hierarchy

  • RootComponent