Describes the supported options in a call to SearchService.search(...).

interface SearchOptions {
    actionOptions?: Record<string, any>;
    actions?: string[];
    context?: string;
    count?: number;
    signal?: AbortSignal;
    stores?: string[];
}

Properties

actionOptions?: Record<string, any>

An optional object with action options to use when an item is selected (see ResultItem.select). This option corresponds to the options parameter of the map-actions.ActionService.trigger() method.

actions?: string[]

An optional array of map action IDs. The associated map actions are triggered when an item is selected (see ResultItem.select). This option corresponds to the actionIds parameter of the map-actions.ActionService.trigger() method.

Defaults to the action IDs "highlight", "zoomto" and "openpopup" defined by the map-actions bundle.

context?: string

Optional context parameter that is passed through the search-api. This value can be used to indicate the origin of the search (e.g. a UI widget or bundle).

See also QueryEvent.context and SelectedEvent.context.

count?: number

An optional number of items requested from each store. Note that the implementation may return fewer results if the stores do not provide that many items in a single query.

By default, only a single query is made to every store.

The default value is 15.

signal?: AbortSignal

Optional signal to cancel the search. When the signal's abort event fires, all individual search operations are cancelled and promises returned by a search will reject with an AbortError.

See https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal.

stores?: string[]

IDs of stores to search. If not provided, all available stores are searched.