Adds (or, if one is already present, replaces) a new context key-value pair.
The context key to add.
The context value to add.
Sets the context for the query. This replaces any existing context with the new one.
The context to set for the query.
Adds a callback that's invoked on state change.
A callback that's invoked on state change.
A function to remove the listener.
The
Context
controller injects custom contextual information into the search requests and usage analytics search events sent from a search interface.Example: context.ts