Skip to main content

Describes a created search query.

4 Methods

cancel()⚓︎

() => Promise<void>

Cancels the search query.

onCompleted()⚓︎

(callback: () => void) => UnsubscribeFunction

Notifies when the search query is completed, i.e. when all search operations in all search providers have been completed.

Parameters (1)

Name Type Required Description
callback⚓︎ () => void

Callback function for handling the event.

onError()⚓︎

(callback: (error: QueryError) => void) => UnsubscribeFunction

Notifies when there is an error in the search process.

Parameters (1)

Name Type Required Description
callback⚓︎ (error: QueryError) => void

Callback function for handling the event. Receives as an argument an object holding the error message sent by the search provider and data describing the provider that has sent the error.

onResults()⚓︎

(callback: (resultBatch: QueryResultBatch) => void) => UnsubscribeFunction

Notifies when a batch with results from the search query is received.

Parameters (1)

Name Type Required Description
callback⚓︎ (resultBatch: QueryResultBatch) => void

Callback function for handling the event. Receives as an argument an object holding a list of the available search result and details about the search provider that has sent the results.