Home > widget-integration > InstantSearchService > checkRedirect
InstantSearchService.checkRedirect() method
Check if query should redirect.
**Legacy**: Inline check in handleRedirect() **New**: Dedicated method with type safety
Signature:
checkRedirect(query: string, redirects: Record<string, string>): string | null;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
query |
string |
Search query |
|
redirects |
Record<string, string> |
Redirect mappings |
Returns:
string | null
Redirect URL or null