Home > widget-integration > InstantSearchService > handleRedirect

InstantSearchService.handleRedirect() method

Handle redirect if query matches.

Has no in-repo callers — InstantSearchController calls and navigates itself. Kept because it is part of the public service surface that shop customisations can extend. Retain the sanitiser below if it is ever wired up.

Signature:

handleRedirect(query: string, redirects: Record<string, string>): boolean;

Parameters

Parameter

Type

Description

query

string

Search query

redirects

Record<string, string>

Redirect mappings

Returns:

boolean

True if redirect was triggered