Creates a Categorize instance that handles fetching categories dependent on settings and query. Supports registering a callback in order to receive categories when they have been received.
The settings that define how the Categorize instance is to operate.
An object that handles the authentication.
This represents the last categories that was received from the backend.
Note: Normally these are only used internally. You can however populate these yourself, but if you are also executing fetches (which the SearchClient is often doing in the automatic mode) then the contents may be overwritten at any time.
Can be used to check the state of deferUpdates.
The number of times this service-instance has aborted a request (typically as a result to starting a new request while the previous is still running and needs to be aborted).
The number of times this service-instance has cancelled a request (as directed from a user cbRequest rejection).
The number of times this service-instance has completed a request (not counting aborted or cancelled requests).
The number of times this service-instance has failed during a request (not counting aborted or cancelled requests).
The number of times this service-instance has started a request.
Creates a Filter object based on the input id (string [] or Category).
NB! This method does NOT apply the filter in the filters collection. It is used behind the scenes by the filter* methods in SearchClient. To apply a filter you need to use the filter* properties/methods in SearchClient.
If the category doesn't exist then the filter will not be created.
If passing in a string[] then the value is expected to match the categoryName property of a listed category.
A string array or a Category that denotes the category to create a filter for.
Decides whether an update should be executed or not. Typically used to temporarily turn off update-execution. When turned back on the second param can be used to indicate whether pending updates should be executed or not.
Turns on or off deferring of updates.
Used to indicate if a pending update is to be executed or skipped when deferring is turned off. The param is ignored for state=true.
Fetches the results from the server.
The query-object that controls which results that are to be returned.
Set to true if you have defined callbacks, but somehow don't want them to be called.
a promise that when resolved returns the data.
Find the category based on the category-name array.
The category array that identifies the category.
The Category object if found or null.
Sets up the Request that is to be executed, with headers and auth as needed.
Set to false to not include the auth jwt token in the request headers. Default=true
Call the service, but take into account deferredUpdates.
The query object to create the fetch for.
A delay for when to execute the update, in milliseconds. Defaults to undefined.
If true then the query match-page number will not be reset to 1. Otherwise it is by default always 1.
Generated using TypeDoc
The Categorize service queries the search-engine for which categories that any search-matches for the same query will contain.
It is normally used indirectly via the SearchClient class.